From 88d2c5c1b802e76bf0467facd1a4d74ae9402a7f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 17 Nov 2023 21:57:39 +0000 Subject: [PATCH 1/2] feat: added DataQualityResult.score, dimension_score, column_score feat: new event types GOVERNANCE_RULE_MATCHED_RESOURCES, GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS, GOVERNANCE_RULE_ERRORS chore: updated service and timeout settings PiperOrigin-RevId: 583444130 Source-Link: https://github.com/googleapis/googleapis/commit/2f91fd52dee784043e4acda6d007b4c36128c662 Source-Link: https://github.com/googleapis/googleapis-gen/commit/84ec5be98819f2b7e4b8bbacade268ef500bf7f0 Copy-Tag: eyJwIjoiRGF0YXBsZXgvLk93bEJvdC55YW1sIiwiaCI6Ijg0ZWM1YmU5ODgxOWYyYjdlNGI4YmJhY2FkZTI2OGVmNTAwYmY3ZjAifQ== --- .../Google/Cloud/Dataplex/V1/Analyze.php | Bin 0 -> 4126 bytes .../Google/Cloud/Dataplex/V1/Content.php | Bin 0 -> 4464 bytes .../Google/Cloud/Dataplex/V1/DataProfile.php | Bin 0 -> 3237 bytes .../Google/Cloud/Dataplex/V1/DataQuality.php | Bin 0 -> 4259 bytes .../Google/Cloud/Dataplex/V1/DataTaxonomy.php | Bin 0 -> 10492 bytes .../Google/Cloud/Dataplex/V1/Datascans.php | Bin 0 -> 7565 bytes .../Google/Cloud/Dataplex/V1/Logs.php | Bin 0 -> 7777 bytes .../Google/Cloud/Dataplex/V1/Metadata.php | Bin 0 -> 8224 bytes .../Google/Cloud/Dataplex/V1/Processing.php | Bin 0 -> 1353 bytes .../Google/Cloud/Dataplex/V1/Resources.php | Bin 0 -> 8775 bytes .../Google/Cloud/Dataplex/V1/Security.php | 34 + .../Google/Cloud/Dataplex/V1/Service.php | 301 ++ .../Google/Cloud/Dataplex/V1/Tasks.php | Bin 0 -> 4969 bytes .../src/Google/Cloud/Dataplex/V1/Action.php | 634 +++ .../Cloud/Dataplex/V1/Action/Category.php | 71 + .../V1/Action/FailedSecurityPolicyApply.php | 77 + .../V1/Action/IncompatibleDataSchema.php | 218 + .../IncompatibleDataSchema/SchemaChange.php | 65 + .../Dataplex/V1/Action/InvalidDataFormat.php | 142 + .../V1/Action/InvalidDataOrganization.php | 36 + .../V1/Action/InvalidDataPartition.php | 70 + .../PartitionStructure.php | 64 + .../Cloud/Dataplex/V1/Action/MissingData.php | 36 + .../Dataplex/V1/Action/MissingResource.php | 36 + .../V1/Action/UnauthorizedResource.php | 38 + .../src/Google/Cloud/Dataplex/V1/Asset.php | 574 +++ .../Cloud/Dataplex/V1/Asset/DiscoverySpec.php | 317 ++ .../V1/Asset/DiscoverySpec/CsvOptions.php | 184 + .../V1/Asset/DiscoverySpec/JsonOptions.php | 112 + .../Dataplex/V1/Asset/DiscoveryStatus.php | 280 ++ .../V1/Asset/DiscoveryStatus/State.php | 79 + .../V1/Asset/DiscoveryStatus/Stats.php | 172 + .../Cloud/Dataplex/V1/Asset/ResourceSpec.php | 154 + .../V1/Asset/ResourceSpec/AccessMode.php | 65 + .../Dataplex/V1/Asset/ResourceSpec/Type.php | 64 + .../Dataplex/V1/Asset/ResourceStatus.php | 182 + .../V1/Asset/ResourceStatus/State.php | 64 + .../Dataplex/V1/Asset/SecurityStatus.php | 153 + .../V1/Asset/SecurityStatus/State.php | 73 + .../Google/Cloud/Dataplex/V1/AssetStatus.php | 149 + .../Cloud/Dataplex/V1/CancelJobRequest.php | 86 + .../src/Google/Cloud/Dataplex/V1/Content.php | 428 ++ .../Cloud/Dataplex/V1/Content/Notebook.php | 70 + .../V1/Content/Notebook/KernelType.php | 57 + .../Cloud/Dataplex/V1/Content/SqlScript.php | 70 + .../V1/Content/SqlScript/QueryEngine.php | 57 + .../Cloud/Dataplex/V1/CreateAssetRequest.php | 241 ++ .../Dataplex/V1/CreateContentRequest.php | 170 + .../V1/CreateDataAttributeBindingRequest.php | 231 + .../V1/CreateDataAttributeRequest.php | 231 + .../Dataplex/V1/CreateDataScanRequest.php | 242 ++ .../Dataplex/V1/CreateDataTaxonomyRequest.php | 236 + .../Cloud/Dataplex/V1/CreateEntityRequest.php | 170 + .../Dataplex/V1/CreateEnvironmentRequest.php | 231 + .../Cloud/Dataplex/V1/CreateLakeRequest.php | 246 ++ .../Dataplex/V1/CreatePartitionRequest.php | 170 + .../Cloud/Dataplex/V1/CreateTaskRequest.php | 206 + .../Cloud/Dataplex/V1/CreateZoneRequest.php | 246 ++ .../Cloud/Dataplex/V1/DataAccessSpec.php | 83 + .../Cloud/Dataplex/V1/DataAttribute.php | 530 +++ .../Dataplex/V1/DataAttributeBinding.php | 492 +++ .../Dataplex/V1/DataAttributeBinding/Path.php | 118 + .../Cloud/Dataplex/V1/DataProfileResult.php | 200 + .../PostScanActionsResult.php | 80 + .../BigQueryExportResult.php | 104 + .../BigQueryExportResult/State.php | 72 + .../Dataplex/V1/DataProfileResult/Profile.php | 70 + .../V1/DataProfileResult/Profile/Field.php | 210 + .../Profile/Field/ProfileInfo.php | 270 ++ .../Field/ProfileInfo/DoubleFieldInfo.php | 262 ++ .../Field/ProfileInfo/IntegerFieldInfo.php | 266 ++ .../Field/ProfileInfo/StringFieldInfo.php | 138 + .../Profile/Field/ProfileInfo/TopNValue.php | 142 + .../Cloud/Dataplex/V1/DataProfileSpec.php | 281 ++ .../V1/DataProfileSpec/PostScanActions.php | 84 + .../PostScanActions/BigQueryExport.php | 78 + .../V1/DataProfileSpec/SelectedFields.php | 90 + .../Dataplex/V1/DataQualityDimension.php | 76 + .../V1/DataQualityDimensionResult.php | 112 + .../Cloud/Dataplex/V1/DataQualityResult.php | 265 ++ .../PostScanActionsResult.php | 80 + .../BigQueryExportResult.php | 104 + .../BigQueryExportResult/State.php | 72 + .../Cloud/Dataplex/V1/DataQualityRule.php | 584 +++ .../V1/DataQualityRule/NonNullExpectation.php | 36 + .../V1/DataQualityRule/RangeExpectation.php | 204 + .../V1/DataQualityRule/RegexExpectation.php | 70 + .../RowConditionExpectation.php | 73 + .../V1/DataQualityRule/SetExpectation.php | 70 + .../StatisticRangeExpectation.php | 239 + .../ColumnStatistic.php | 71 + .../TableConditionExpectation.php | 73 + .../DataQualityRule/UniquenessExpectation.php | 36 + .../Dataplex/V1/DataQualityRuleResult.php | 317 ++ .../Dataplex/V1/DataQualityScanRuleResult.php | 450 ++ .../EvaluationType.php | 64 + .../V1/DataQualityScanRuleResult/Result.php | 64 + .../V1/DataQualityScanRuleResult/RuleType.php | 114 + .../Cloud/Dataplex/V1/DataQualitySpec.php | 215 + .../V1/DataQualitySpec/PostScanActions.php | 84 + .../PostScanActions/BigQueryExport.php | 78 + .../src/Google/Cloud/Dataplex/V1/DataScan.php | 676 +++ .../Dataplex/V1/DataScan/ExecutionSpec.php | 136 + .../Dataplex/V1/DataScan/ExecutionStatus.php | 124 + .../Cloud/Dataplex/V1/DataScanEvent.php | 633 +++ .../DataProfileAppliedConfigs.php | 150 + .../V1/DataScanEvent/DataProfileResult.php | 70 + .../DataQualityAppliedConfigs.php | 112 + .../V1/DataScanEvent/DataQualityResult.php | 292 ++ .../DataScanEvent/PostScanActionsResult.php | 80 + .../BigQueryExportResult.php | 104 + .../BigQueryExportResult/State.php | 72 + .../Dataplex/V1/DataScanEvent/ScanType.php | 64 + .../Cloud/Dataplex/V1/DataScanEvent/Scope.php | 64 + .../Cloud/Dataplex/V1/DataScanEvent/State.php | 85 + .../Dataplex/V1/DataScanEvent/Trigger.php | 64 + .../Google/Cloud/Dataplex/V1/DataScanJob.php | 453 ++ .../Cloud/Dataplex/V1/DataScanJob/State.php | 92 + .../Google/Cloud/Dataplex/V1/DataScanType.php | 61 + .../Google/Cloud/Dataplex/V1/DataSource.php | 123 + .../Google/Cloud/Dataplex/V1/DataTaxonomy.php | 415 ++ .../Cloud/Dataplex/V1/DeleteAssetRequest.php | 86 + .../Dataplex/V1/DeleteContentRequest.php | 86 + .../V1/DeleteDataAttributeBindingRequest.php | 132 + .../V1/DeleteDataAttributeRequest.php | 124 + .../Dataplex/V1/DeleteDataScanRequest.php | 96 + .../Dataplex/V1/DeleteDataTaxonomyRequest.php | 124 + .../Cloud/Dataplex/V1/DeleteEntityRequest.php | 124 + .../Dataplex/V1/DeleteEnvironmentRequest.php | 86 + .../Cloud/Dataplex/V1/DeleteLakeRequest.php | 86 + .../Dataplex/V1/DeletePartitionRequest.php | 140 + .../Cloud/Dataplex/V1/DeleteTaskRequest.php | 86 + .../Cloud/Dataplex/V1/DeleteZoneRequest.php | 86 + .../Cloud/Dataplex/V1/DiscoveryEvent.php | 378 ++ .../V1/DiscoveryEvent/ActionDetails.php | 74 + .../V1/DiscoveryEvent/ConfigDetails.php | 82 + .../V1/DiscoveryEvent/EntityDetails.php | 108 + .../Dataplex/V1/DiscoveryEvent/EntityType.php | 64 + .../Dataplex/V1/DiscoveryEvent/EventType.php | 99 + .../V1/DiscoveryEvent/PartitionDetails.php | 184 + .../src/Google/Cloud/Dataplex/V1/Entity.php | 785 ++++ .../V1/Entity/CompatibilityStatus.php | 124 + .../CompatibilityStatus/Compatibility.php | 112 + .../Google/Cloud/Dataplex/V1/Entity/Type.php | 64 + .../Google/Cloud/Dataplex/V1/Environment.php | 518 +++ .../Dataplex/V1/Environment/Endpoints.php | 104 + .../V1/Environment/InfrastructureSpec.php | 123 + .../InfrastructureSpec/ComputeResources.php | 146 + .../InfrastructureSpec/OsImageRuntime.php | 200 + .../Dataplex/V1/Environment/SessionSpec.php | 134 + .../Dataplex/V1/Environment/SessionStatus.php | 74 + .../Cloud/Dataplex/V1/GetAssetRequest.php | 86 + .../Cloud/Dataplex/V1/GetContentRequest.php | 120 + .../V1/GetContentRequest/ContentView.php | 66 + .../V1/GetDataAttributeBindingRequest.php | 86 + .../Dataplex/V1/GetDataAttributeRequest.php | 86 + .../Dataplex/V1/GetDataScanJobRequest.php | 130 + .../GetDataScanJobRequest/DataScanJobView.php | 64 + .../Cloud/Dataplex/V1/GetDataScanRequest.php | 130 + .../V1/GetDataScanRequest/DataScanView.php | 64 + .../Dataplex/V1/GetDataTaxonomyRequest.php | 86 + .../Cloud/Dataplex/V1/GetEntityRequest.php | 124 + .../V1/GetEntityRequest/EntityView.php | 71 + .../Dataplex/V1/GetEnvironmentRequest.php | 86 + .../Cloud/Dataplex/V1/GetJobRequest.php | 86 + .../Cloud/Dataplex/V1/GetLakeRequest.php | 86 + .../Cloud/Dataplex/V1/GetPartitionRequest.php | 96 + .../Cloud/Dataplex/V1/GetTaskRequest.php | 86 + .../Cloud/Dataplex/V1/GetZoneRequest.php | 86 + .../Cloud/Dataplex/V1/GovernanceEvent.php | 149 + .../Dataplex/V1/GovernanceEvent/Entity.php | 112 + .../V1/GovernanceEvent/Entity/EntityType.php | 64 + .../Dataplex/V1/GovernanceEvent/EventType.php | 155 + .../src/Google/Cloud/Dataplex/V1/Job.php | 483 +++ .../Google/Cloud/Dataplex/V1/Job/Service.php | 55 + .../Google/Cloud/Dataplex/V1/Job/State.php | 90 + .../Google/Cloud/Dataplex/V1/Job/Trigger.php | 65 + .../src/Google/Cloud/Dataplex/V1/JobEvent.php | 394 ++ .../Dataplex/V1/JobEvent/ExecutionTrigger.php | 65 + .../Cloud/Dataplex/V1/JobEvent/Service.php | 57 + .../Cloud/Dataplex/V1/JobEvent/State.php | 78 + .../Cloud/Dataplex/V1/JobEvent/Type.php | 64 + .../src/Google/Cloud/Dataplex/V1/Lake.php | 518 +++ .../Cloud/Dataplex/V1/Lake/Metastore.php | 82 + .../Dataplex/V1/Lake/MetastoreStatus.php | 182 + .../V1/Lake/MetastoreStatus/State.php | 78 + .../Cloud/Dataplex/V1/ListActionsResponse.php | 105 + .../Dataplex/V1/ListAssetActionsRequest.php | 174 + .../Cloud/Dataplex/V1/ListAssetsRequest.php | 242 ++ .../Cloud/Dataplex/V1/ListAssetsResponse.php | 105 + .../Cloud/Dataplex/V1/ListContentRequest.php | 232 + .../Cloud/Dataplex/V1/ListContentResponse.php | 105 + .../V1/ListDataAttributeBindingsRequest.php | 262 ++ .../V1/ListDataAttributeBindingsResponse.php | 139 + .../Dataplex/V1/ListDataAttributesRequest.php | 246 ++ .../V1/ListDataAttributesResponse.php | 139 + .../Dataplex/V1/ListDataScanJobsRequest.php | 266 ++ .../Dataplex/V1/ListDataScanJobsResponse.php | 105 + .../Dataplex/V1/ListDataScansRequest.php | 256 ++ .../Dataplex/V1/ListDataScansResponse.php | 139 + .../Dataplex/V1/ListDataTaxonomiesRequest.php | 251 ++ .../V1/ListDataTaxonomiesResponse.php | 139 + .../Cloud/Dataplex/V1/ListEntitiesRequest.php | 270 ++ .../V1/ListEntitiesRequest/EntityView.php | 65 + .../Dataplex/V1/ListEntitiesResponse.php | 105 + .../Dataplex/V1/ListEnvironmentsRequest.php | 246 ++ .../Dataplex/V1/ListEnvironmentsResponse.php | 105 + .../Cloud/Dataplex/V1/ListJobsRequest.php | 174 + .../Cloud/Dataplex/V1/ListJobsResponse.php | 105 + .../Dataplex/V1/ListLakeActionsRequest.php | 174 + .../Cloud/Dataplex/V1/ListLakesRequest.php | 243 ++ .../Cloud/Dataplex/V1/ListLakesResponse.php | 139 + .../Dataplex/V1/ListPartitionsRequest.php | 268 ++ .../Dataplex/V1/ListPartitionsResponse.php | 105 + .../Cloud/Dataplex/V1/ListSessionsRequest.php | 236 + .../Dataplex/V1/ListSessionsResponse.php | 105 + .../Cloud/Dataplex/V1/ListTasksRequest.php | 238 + .../Cloud/Dataplex/V1/ListTasksResponse.php | 139 + .../Dataplex/V1/ListZoneActionsRequest.php | 174 + .../Cloud/Dataplex/V1/ListZonesRequest.php | 238 + .../Cloud/Dataplex/V1/ListZonesResponse.php | 105 + .../Cloud/Dataplex/V1/OperationMetadata.php | 307 ++ .../Google/Cloud/Dataplex/V1/Partition.php | 202 + .../Cloud/Dataplex/V1/ResourceAccessSpec.php | 145 + .../Cloud/Dataplex/V1/RunDataScanRequest.php | 102 + .../Cloud/Dataplex/V1/RunDataScanResponse.php | 77 + .../Cloud/Dataplex/V1/RunTaskRequest.php | 200 + .../Cloud/Dataplex/V1/RunTaskResponse.php | 75 + .../Google/Cloud/Dataplex/V1/ScannedData.php | 75 + .../V1/ScannedData/IncrementalField.php | 142 + .../src/Google/Cloud/Dataplex/V1/Schema.php | 221 + .../Google/Cloud/Dataplex/V1/Schema/Mode.php | 71 + .../Dataplex/V1/Schema/PartitionField.php | 115 + .../Dataplex/V1/Schema/PartitionStyle.php | 59 + .../Cloud/Dataplex/V1/Schema/SchemaField.php | 218 + .../Google/Cloud/Dataplex/V1/Schema/Type.php | 156 + .../src/Google/Cloud/Dataplex/V1/Session.php | 183 + .../Google/Cloud/Dataplex/V1/SessionEvent.php | 332 ++ .../Dataplex/V1/SessionEvent/EventType.php | 79 + .../Dataplex/V1/SessionEvent/QueryDetail.php | 250 ++ .../V1/SessionEvent/QueryDetail/Engine.php | 64 + .../src/Google/Cloud/Dataplex/V1/State.php | 75 + .../Cloud/Dataplex/V1/StorageAccess.php | 71 + .../Dataplex/V1/StorageAccess/AccessMode.php | 64 + .../Cloud/Dataplex/V1/StorageFormat.php | 311 ++ .../V1/StorageFormat/CompressionFormat.php | 64 + .../Dataplex/V1/StorageFormat/CsvOptions.php | 188 + .../Dataplex/V1/StorageFormat/Format.php | 134 + .../V1/StorageFormat/IcebergOptions.php | 74 + .../Dataplex/V1/StorageFormat/JsonOptions.php | 74 + .../Cloud/Dataplex/V1/StorageSystem.php | 61 + .../src/Google/Cloud/Dataplex/V1/Task.php | 544 +++ .../Cloud/Dataplex/V1/Task/ExecutionSpec.php | 284 ++ .../Dataplex/V1/Task/ExecutionStatus.php | 124 + .../Dataplex/V1/Task/InfrastructureSpec.php | 162 + .../BatchComputeResources.php | 116 + .../ContainerImageRuntime.php | 204 + .../V1/Task/InfrastructureSpec/VpcNetwork.php | 148 + .../Dataplex/V1/Task/NotebookTaskConfig.php | 206 + .../Dataplex/V1/Task/SparkTaskConfig.php | 373 ++ .../Cloud/Dataplex/V1/Task/TriggerSpec.php | 262 ++ .../Dataplex/V1/Task/TriggerSpec/Type.php | 64 + .../src/Google/Cloud/Dataplex/V1/Trigger.php | 108 + .../Cloud/Dataplex/V1/Trigger/OnDemand.php | 36 + .../Cloud/Dataplex/V1/Trigger/Schedule.php | 106 + .../Cloud/Dataplex/V1/UpdateAssetRequest.php | 179 + .../Dataplex/V1/UpdateContentRequest.php | 179 + .../V1/UpdateDataAttributeBindingRequest.php | 174 + .../V1/UpdateDataAttributeRequest.php | 174 + .../Dataplex/V1/UpdateDataScanRequest.php | 180 + .../Dataplex/V1/UpdateDataTaxonomyRequest.php | 174 + .../Cloud/Dataplex/V1/UpdateEntityRequest.php | 118 + .../Dataplex/V1/UpdateEnvironmentRequest.php | 179 + .../Cloud/Dataplex/V1/UpdateLakeRequest.php | 179 + .../Cloud/Dataplex/V1/UpdateTaskRequest.php | 179 + .../Cloud/Dataplex/V1/UpdateZoneRequest.php | 179 + .../src/Google/Cloud/Dataplex/V1/Zone.php | 510 +++ .../Cloud/Dataplex/V1/Zone/DiscoverySpec.php | 317 ++ .../V1/Zone/DiscoverySpec/CsvOptions.php | 184 + .../V1/Zone/DiscoverySpec/JsonOptions.php | 112 + .../Cloud/Dataplex/V1/Zone/ResourceSpec.php | 74 + .../V1/Zone/ResourceSpec/LocationType.php | 64 + .../Google/Cloud/Dataplex/V1/Zone/Type.php | 68 + .../ContentServiceClient/create_content.php | 85 + .../ContentServiceClient/delete_content.php | 75 + .../V1/ContentServiceClient/get_content.php | 77 + .../ContentServiceClient/get_iam_policy.php | 76 + .../V1/ContentServiceClient/get_location.php | 57 + .../V1/ContentServiceClient/list_content.php | 77 + .../ContentServiceClient/list_locations.php | 62 + .../ContentServiceClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 87 + .../ContentServiceClient/update_content.php | 80 + .../create_data_scan.php | 100 + .../delete_data_scan.php | 83 + .../DataScanServiceClient/get_data_scan.php | 74 + .../get_data_scan_job.php | 79 + .../DataScanServiceClient/get_iam_policy.php | 72 + .../V1/DataScanServiceClient/get_location.php | 57 + .../list_data_scan_jobs.php | 79 + .../DataScanServiceClient/list_data_scans.php | 79 + .../DataScanServiceClient/list_locations.php | 62 + .../DataScanServiceClient/run_data_scan.php | 76 + .../DataScanServiceClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_data_scan.php | 77 + .../create_data_attribute.php | 98 + .../create_data_attribute_binding.php | 96 + .../create_data_taxonomy.php | 95 + .../delete_data_attribute.php | 86 + .../delete_data_attribute_binding.php | 93 + .../delete_data_taxonomy.php | 86 + .../get_data_attribute.php | 77 + .../get_data_attribute_binding.php | 76 + .../get_data_taxonomy.php | 76 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_data_attribute_bindings.php | 77 + .../list_data_attributes.php | 81 + .../list_data_taxonomies.php | 78 + .../list_locations.php | 62 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_data_attribute.php | 74 + .../update_data_attribute_binding.php | 74 + .../update_data_taxonomy.php | 74 + .../V1/DataplexServiceClient/cancel_job.php | 76 + .../V1/DataplexServiceClient/create_asset.php | 106 + .../create_environment.php | 110 + .../V1/DataplexServiceClient/create_lake.php | 97 + .../V1/DataplexServiceClient/create_task.php | 113 + .../V1/DataplexServiceClient/create_zone.php | 113 + .../V1/DataplexServiceClient/delete_asset.php | 88 + .../delete_environment.php | 87 + .../V1/DataplexServiceClient/delete_lake.php | 82 + .../V1/DataplexServiceClient/delete_task.php | 81 + .../V1/DataplexServiceClient/delete_zone.php | 82 + .../V1/DataplexServiceClient/get_asset.php | 78 + .../DataplexServiceClient/get_environment.php | 77 + .../DataplexServiceClient/get_iam_policy.php | 72 + .../V1/DataplexServiceClient/get_job.php | 78 + .../V1/DataplexServiceClient/get_lake.php | 72 + .../V1/DataplexServiceClient/get_location.php | 57 + .../V1/DataplexServiceClient/get_task.php | 72 + .../V1/DataplexServiceClient/get_zone.php | 72 + .../list_asset_actions.php | 83 + .../V1/DataplexServiceClient/list_assets.php | 77 + .../list_environments.php | 77 + .../V1/DataplexServiceClient/list_jobs.php | 77 + .../list_lake_actions.php | 77 + .../V1/DataplexServiceClient/list_lakes.php | 78 + .../DataplexServiceClient/list_locations.php | 62 + .../DataplexServiceClient/list_sessions.php | 82 + .../V1/DataplexServiceClient/list_tasks.php | 77 + .../list_zone_actions.php | 77 + .../V1/DataplexServiceClient/list_zones.php | 77 + .../V1/DataplexServiceClient/run_task.php | 72 + .../DataplexServiceClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../V1/DataplexServiceClient/update_asset.php | 91 + .../update_environment.php | 93 + .../V1/DataplexServiceClient/update_lake.php | 74 + .../V1/DataplexServiceClient/update_task.php | 101 + .../V1/DataplexServiceClient/update_zone.php | 96 + .../MetadataServiceClient/create_entity.php | 158 + .../create_partition.php | 93 + .../MetadataServiceClient/delete_entity.php | 80 + .../delete_partition.php | 80 + .../V1/MetadataServiceClient/get_entity.php | 78 + .../MetadataServiceClient/get_iam_policy.php | 72 + .../V1/MetadataServiceClient/get_location.php | 57 + .../MetadataServiceClient/get_partition.php | 81 + .../MetadataServiceClient/list_entities.php | 81 + .../MetadataServiceClient/list_locations.php | 62 + .../MetadataServiceClient/list_partitions.php | 83 + .../MetadataServiceClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../MetadataServiceClient/update_entity.php | 151 + .../v1/src/V1/Client/ContentServiceClient.php | 531 +++ .../src/V1/Client/DataScanServiceClient.php | 691 +++ .../V1/Client/DataTaxonomyServiceClient.php | 900 ++++ .../src/V1/Client/DataplexServiceClient.php | 1467 +++++++ .../src/V1/Client/MetadataServiceClient.php | 666 +++ .../v1/src/V1/ContentServiceClient.php | 34 + .../v1/src/V1/DataScanServiceClient.php | 34 + .../v1/src/V1/DataTaxonomyServiceClient.php | 34 + .../v1/src/V1/DataplexServiceClient.php | 34 + .../V1/Gapic/ContentServiceGapicClient.php | 853 ++++ .../V1/Gapic/DataScanServiceGapicClient.php | 1258 ++++++ .../Gapic/DataTaxonomyServiceGapicClient.php | 1768 ++++++++ .../V1/Gapic/DataplexServiceGapicClient.php | 3045 +++++++++++++ .../V1/Gapic/MetadataServiceGapicClient.php | 1132 +++++ .../v1/src/V1/MetadataServiceClient.php | 34 + .../Dataplex/v1/src/V1/gapic_metadata.json | 529 +++ .../content_service_client_config.json | 106 + .../content_service_descriptor_config.php | 151 + .../content_service_rest_client_config.php | 442 ++ .../data_scan_service_client_config.json | 87 + .../data_scan_service_descriptor_config.php | 221 + .../data_scan_service_rest_client_config.php | 389 ++ .../data_taxonomy_service_client_config.json | 122 + ...ata_taxonomy_service_descriptor_config.php | 357 ++ ...ta_taxonomy_service_rest_client_config.php | 486 +++ .../dataplex_service_client_config.json | 246 ++ .../dataplex_service_descriptor_config.php | 676 +++ .../dataplex_service_rest_client_config.php | 701 +++ .../metadata_service_client_config.json | 126 + .../metadata_service_descriptor_config.php | 211 + .../metadata_service_rest_client_config.php | 400 ++ .../V1/Client/ContentServiceClientTest.php | 830 ++++ .../V1/Client/DataScanServiceClientTest.php | 1250 ++++++ .../Client/DataTaxonomyServiceClientTest.php | 2183 ++++++++++ .../V1/Client/DataplexServiceClientTest.php | 3840 +++++++++++++++++ .../V1/Client/MetadataServiceClientTest.php | 1239 ++++++ .../Unit/V1/ContentServiceClientTest.php | 731 ++++ .../Unit/V1/DataScanServiceClientTest.php | 1097 +++++ .../Unit/V1/DataTaxonomyServiceClientTest.php | 1977 +++++++++ .../Unit/V1/DataplexServiceClientTest.php | 3594 +++++++++++++++ .../Unit/V1/MetadataServiceClientTest.php | 1092 +++++ 419 files changed, 87361 insertions(+) create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataTaxonomy.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Datascans.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Logs.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Processing.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Resources.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php create mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/DataScanServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/DataTaxonomyServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/DataplexServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/ContentServiceGapicClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_client_config.json create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_descriptor_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php create mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php create mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php new file mode 100644 index 0000000000000000000000000000000000000000..e8a5762450107149e31c37292482dd4b68965c7f GIT binary patch literal 4126 zcmcgvL37ha6h?Lu$IlRg=oG~;MFd(xDe@#KEj5LXoj8dHnwTWC1LGNWEw2+1MG{)c zgJFE^p)qOZ|SAezrdvzenL-uyDP~iArq77G#4wo`+fV~+xNY<`}H^et`ArB zRqE1!gtV=OIr-XazK1^F(-V6dJPa6uX59^GfF?ATDYF9G551s)OUvaQ8m7VH zBXc+6Z8@FY(dVR%(c#^7J)mI}xOau!oS>h6HQy1fif=bpZ0fYDbeD8( zFDRD>UJXc&f^O3I>_$c%I-X|2!A9RYjp=fPDThaK0_e7lNfeTO|J_(|jJNLF@u5}P z?evURFpKBXsPY(JhredvlhM*w)#N%uq`8r#xzU|3&cqDFw@X1BS()?2xg*Jwg)CnA zQM^)U1@o@dj$;(hUp_b=CV`L(W`8>ag__&71JB*3Zm50*V_a~WqAPRx>dn`c>_3%{ z;c9BQ7qa0y*A-B0Q4?!CoJY{V@rW7rhKDfCmRkmj`>|EwfO9*vb zn5167X6d!5X?aMaarwm)7h!6jyfB9*xf11M@#hRoy}i9!gfqe|vr7Y>Lvb|_nT1@> zNSBz7-3mxxQ-&L5u~Z0!T!OQHFWkkf!-lqo$_fAa@d&A;`jei$PDZf zG4nvN#d$b;U|cOgc8~U?N9q|E?-D1XB3Suy=8jS=Kt3(9)jZ?^c_hVWP)PC^Rfcu) z91p48cBq-uTtQk`m`Pkpin5V3E*T^p&Qq7P5ZFQOn^-u4F!F^7lVU~j8k|Y?5}HxZ z!vw)wNLSWnu_{}<4f#|H>W7eby^yv%Z;uU*E6Xb{d+td8IC-{s3kpM(?YMZ9dv7Y; z(dz#O`umJpAuGL#zxpM|vqa0rvE&m6$sXkc_|q@ZLG!_}q5t}`zvm#gVal-E6J9_%_#QaeHxJlc^(ln zq%T4(k0KYs%wV;u0AM1R@-iCNtDDE~z4hGL68G0NMZFJ`NseidfpHP#79hFM;;xac%R7SzBMNuh-1S z>syW5QhlXfTb@3p=3#uRQQ3SjohkmRz+_^gx&ehfytPxu410cJ*X`r&N(hVx0=1)<47}I1W{|19h&%JeX`5n9^u z29IjIuH(BpDV2Wf?%=aEf!>7P;`Q{2^O<~R4!uhG)z-G&@gfx~<-4&DeSm)f%!f6z literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php new file mode 100644 index 0000000000000000000000000000000000000000..c316ae8fc52831b95a6b3dec76fed3bd41395806 GIT binary patch literal 4464 zcmcIoO>Y}T7-o~SG?S);X=#Ir+Q|~pG^A_QZE10v!rE~nr}?m&q)3(}YrPpKOV_*G z-Eq>iid4ZLKtc$Kp5W3G9QY4hIKle;l_#i+RZv!H?}K$v9_L1o}Jj=$uhS2N^T3%U0h1ufTI8_bY zrf=db+H~Db8>da%ZEmDD3}SdTew5z6k~Uq3V25bjBmj=lz=3C&7|oY*OPCl;wldGP zD|x0}nU&g=`&VuOVA@6ypuDgGo&ZEYUbALfCJKl_=+}f5R4vCMmSJ0uDTWzTH|zjY z-K1>2>6pZF9mEt?91~AoLc%7Ko$y?Wc?N~?lo$<^f=ZEM@Eyah%;LcGEswZX)zat0BA6SY9G8uspE+_~eT(V#U{ zpI1P^1Et}p4qXRtoJPkE)x+S8( zqZ1j!%t6W()ZbCcspB^s{D@Rz-dVW}s=q1V&3Swnb&n*%1u(E};T;b7ROUul7>VxJ z5-!8yyie6d5q=DYWG>h^3$r7y!9j2=r>_?C zBMLkL2Ikfm7f1Rs-;aP((!?tEw=EOHr+r|!rTd`PKFAh9*`}$Z`%8VMeD>>~U-o^j zs5jYkc_P|+hPKD2*d#%EDs8)_xL?_C+Q#(RUbxg)1UG_g*wy7b>eU{MMEd*sDdB$F z6x$B`no`ix+%Kb`MX(DBeiRgZrDSv-y>zaz);xlU79P@5Q+pAX@_goYuhv=&?dzvy zK+~~t2KN;(+%i*M#!QP~$jsTWn4(e0Z*29cpd*<2kjLK(3*`@{u63)-K=12(9>U)h z01mniz8^-~L2q_a^C3d`DhS~#A^b-HCn>^cGlOb~k>2lg+gGGevzx)Iltu ztTI(zPJNgD=ZaeDC2@R| z^X!pCz>JoXdbby|?JdH;6fhLq8Q^q?HQDAdv5=X|9ZE}fWY0f@JzsO>>#&#GZC{s5 zS?cc3`nfin-7mVfMTi$<)9Ia^9f>Sjo{c8i5`QdQ_H2XHUB8jr0%LTqZp%ULq+BLS z>7-TvEJ? J?}0r4{sT;h^>Y9K literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php new file mode 100644 index 0000000000000000000000000000000000000000..41e495fc657a3be83922ee88afbe70712691a923 GIT binary patch literal 3237 zcmb_eYfmFp7~Wxk$_un`++CZACL^v{&~*sAU$BU#rG;%&=vpArG?`3iPRqpUoMGln z1vmU2{WbmuKN!FG158Xze9t-4(hDSD=$Fp9J@4&#FJF8Wokj4Gc|b!NJDhrE`_klR z)Qn=rnacvRopw4jHeJ?>{D8)mX;zQS!=q!fR;?d@h))xi#x5-&+zFAar^(i5!=j2aU?Nlsn=<>p()Z_5?($nnAQqw{`&Bz)2EQ z>@^e;yaf|~QQ8iC*G#y>@$Z?R*na49-wFJm(U@Jc;{*xC_tSSfY3OpFg{F9L6uNYM z!&I2!?z4!Y@w?_gCzQ$=`l3}2IgLXnXjN(A#(u=v5p(j@W2?#(FDHJ^RyXO1X)-q7xS4DtF*vi+my8?q+1PyXd*&c0VwDb$oruiq#i}N z7`~)9Cvms$j@zUGbun>e_>&X?e*jqH7Yzy%W{?gP+J5&urSYXrFCrH6q9$d% zzPkw%m{!H_z7c>mi6>1mUO;|)n;5Vh(NW#z%U zdKTWbKbB#2Bv{``OtK0Kf(y^H z;C2@9k8g((q`})lMREqkDJt5^3q=*;^6fxVMow~4X)64!8^65+xq-@cn9tZbgKoPk z>&NZ3BtMP6b1)~r$P&zoP^hSh6~BzA%*O?>>M@V1BqXPkey`oj#;oy3se>rg!wxh4 znuo>AM6o6W+fo_?HugcENli5J6!M;*a7lu_Gm(K8!@sJrR6V zB--dP?BaANvHOrVRwed`K;sP*CJYy$@A;t}(6GzTBqepZ=Ufc-M5E9J9h^Q6N?khG zmvk@!Sedkp6d;$~m4F%+EP^9I=s7W_KJEL0W})P`MixOw1!P^(MeR9HotR^}NHDE+ z6fDl23t235<45dm<5vA|VcN7XrA#JFGqz#jnvcscCkdZrEiP4oRNld*${p#H$`U|F zG&P*aFx&o}fhQA%UR4P47M@PDkU>dPo#cMh8*j5&5gKnDqjm024IbZgN+OsO1Dh&P z`IoKMy%ONgT3AgXMAlsL7;-ojC&(^U2j%YCKFrBG$U32 zBeDz&&6B;oTCIvp4VgT@U#@?H-!sUXT=VOCqk#*(62SX7#NTQ~Wo4v4U|Hm>q5ZI} zhOohq!+M)tc0JoWk)MtCV$_e?JEEbf&-Q#IAYMHm4udb$kUKIH3-|i&4fC+PsixK| HxB~bOBw-A( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php new file mode 100644 index 0000000000000000000000000000000000000000..d0ba14beaf9d23fe0ce7a8b135f39c6639344cc4 GIT binary patch literal 4259 zcmcInTW=dh6vlCGK2CF)CavR8v4oZ;qS$Jvpd?Kz$97r^n!0gPF0!;*ugA`|o89eR z(u68+yz)Ev9UvaynLof2NIXM<2PDp!S=(#JMlP4UWIc1{JGbwgnRDxobKt-m%3W@8 zSMzyYshueP0aqN?_HErZm0Hkfa97doL&q?=n^Ba)17+vIo>DB7_Fl)Mo*lS4Ussy8 z-86YtH|?OFt!uvKnEW_4}N-*(F=y1w4z zemjb^va%YgB{-v@tVkQz*UuQasrYWdquLe4<$mB=8^Ue^IBkDb`$R0~7}afqoAoVz zpdA^uyT0D>ssl3U=q?YFIP|GADXL(lqo&iY|W88{EI&1>#8yUVJH{>o zxb`!(VVFp`)EI6g^)z@k! z7kXt7mVX+9xoA{{9Gix52m1uCi+D}4djNIgkXs(sxtAIdX}U3#*@f0ItPQk)-EQSN zEjt<pD?^a2Pun!t@XdNw5sDqJOM#TnXa1*RFUQEL)wB&p&n!mvd zhGvKchvfJ05r8$H0+dfI`;d+})mv`ckZ2cf=w4>1Jhp*kW;zWaj#?*|FT;F4t!xTL z=}96x%<_w=u4YeV%szrSSF@U&dLY;7xnWzOW$Qy(MktwGg21lVLb&$|t5#v&vMp6a zGzv~sO0L}+9(>2Pb}%j7@D-TxxZh zSc40JWgt&1tfwyYx|3)Th3cU2@1iE!bl}%iAGTw^L7GNnDXwlKoVDCsn)LU+-tN~i_8KtHcMaWF=@_>t z0`(MWnUqFF1n_)IfM_oT((}O1)?oSyOm`O$I}hW+D*1Ah@k_snF7y-xHrg>!XR?cjw=AGwcb zk+JlmjArE~EDkK0zdgB?#Frr!x9XobeCwMSyo#gtz{G6L zMy@Y0la^zj-jqX6Yx=McvrW4*f#cj04&gMAJGG5^I9NNipL6?gsr7^lb)vYJK@+mV z9d-jJp~rYzdD-XT*QtQUI|Y{r3cpUXqWR#0_kczfLmH)PYbrO=6X)xG#yK8v^O`gr!}1& z*R-%#(zNAO?f&Y9c6<5m#xxA|ownD+6>ZCLwk%w3T28xFZW)2$TKI8!_bUBd4~)l- z?d9*L1wWhQ5V4W->dO07PvaH`|^W>}6j$Z4PhO1n6dV+=s$PR{2-)P^US(LC88uGqO^OpaE{MoxF!e)0VC6i!q*}XHVNYD4GuYOFcmTI zIIj4k+6;e2*XxiZpQDFcUg}{;A;Rr0a62o+LD`Ww;6`8NMlRQjGA5Pg4~0s~hb*Wa zs3*4&5lf3e6pa}aKN>|xqcW&g&?r&UyrL@=`p9$r61ph!%lv`V`Xx~Da>v*c zXryhn@;N$m1cs{D&}7rYuocwF!ub(+GPzJFu}PQWfeT78xXgfly-$HXfiUhI*CRe z;yqRi^%xr4HLNyf`K{!xE0y3g{hf@pxeE|@fSZ9|e!@TPmo2BsM5p{jeB7tV=9{94 z!J1TFZn$-`wO{<{I66j>p^JFc#SYM1p`fYFpjXIPvT^gIcAzF4{RM>09SNH+Q`o%P z8#Xf5ByMh@3D@vIqad|_K|(snpYmMKp1(n$w~9^+VXGU>CieZh@8V{@1uIW3%y$n% zY_mEYv<_n!?pM$Wije4Jm`*m^eKLxk&WQ$v{!f(8^!Jsl5Ni#Ce$gWCmnFjmFXR`L z7=Ic^r#pyIHSHE`?`pM!AJ-^9N@zY4J;WSeK$fh=SW@YO2%#rDyj8dMc1$0DU znc{b%Iu6WvrjOnElBy#lYvbo_AnD+|T0vv35p4VU#{+R(c)tc?DMt#m8X6^ksV6&d z0Q*KR=4kFPjt)wl_klV;QU-+I_Xc5*)H|MwBwZSe8H6^~(?}I{ta}*FhZs&z#lI_P zYKis^gi?ZoZ{c^^&~>V>p>ZagyivIfxqPl)K+|F)^EuY!o^y|HcItVqSOGuz5#g0B zOAfetjPO!!dAw=4)Em3PKT_}yB;h3pEuCi6&$4bn`jrI3K`qQ;>VDQd!`?q7dnm? zP~o#=Pu;?G9}exbw6qIT)N=^Y?*r!{wrO1_Xid~pXnfPO;2=&5#lJj*jyPTmd-cX% zq?s&!sGvfc*S-rUWvt#r$D{CpfS`z^v&>iwaPqi~9|!e_rxcxl+cRw&2+`a&8Wyfg zphF;_Zp8;^Y8hKNz%RH=M6_t{DmkJQ{|Pw=xhdH$O80tUWHw z%jhee&pAVDGrcJ)-R#fNPawXKqjI2#?{Fkd`psB6tltryzKzato+f-wwCGTg%q?c| zHxa7JsU=m1tM}*1)}KY#8g-nr^%iHVAzBZ?*33mYG+!-L2>B{q6A&A!Txpd3pMs`S zD9bl!vFs4r>LoPQNy~b;$4B?qb#yk}j?=i5mBp-s=uhUS5P1rjW04<@)7^t%+S&eFUJ`k3nX#Y0HP0g)+m0eAWiIX5}JG+$@(F%^0`v}S5WUB&U5CkqI2mm6bdk4 z=?<*}@1p4x9eD9YO^QNp;m7CEspUv_y^iSxrTW7hQbVy2y{+2gmLqA+C8cm)@HukN zS(5kN&`!Pgw|{+*TPiM)Uw59crv8RJY|KS2spjIBQx?P*IZMHJ7H-iLP*{q?Nr_xoc1cJ4s%~ySkq{=y zVzT)*yHzDei%d!Qhl11)oLQ2Pw9c3Wo5JAQ9D~6?Q6K2^%KE83ht9-rmgx^8YD#_o z2%!m;;DJG}-V5SMYZ2Nt0rBLeaoQlJK*c2%v3dyLAL#t_tNvO+$74q`_3Pc;iJ6K3 zGM-I}dWXx0DU$kWF7@cZ^-f*v?t3UP@hwS&(MM{2&v>?8d@ZZg#24}_U3!-T{Tor~ zF+@8ldLX7jiLa>`UG8#em;&10Lh?eHiF?;8dEG~4Ox_<@@*XU#g(8)Rr>|PYUG~c$ zT3vHmOy8k9Wo&@-{TB`cp+Lob>6O0jqcWziO_{Se$Dr4bIdRuWnhvFM&(h9qqLEX3 z+{X&tN_ZmT?LpKYW4ZKwi)BMSJP|_${Iilg^a?e(-d#<4chQ9byT9U{j);b+ulhj_ zol229wZ|rtVlK+mM-qR*TaV(+{*st%HzL1>RAP5B2XMKNs)%tVB<)x+{(EAI^nD0v zNfEJLX-P59n3i9%wESS7y!=~%7GB=_NxJsR zONx2MygZ>O*XI~o`k}mg9uB2te~EN#GR{mLTWBrf>_Mi4dclF0%hnnTUmcb#p?LjH zK_}u$q+ZRgS|Xmz*Hy*)9We}D!os(o>hvI;@-zQm_0o0_xPGNve)Q-O4@&+XW3+>9 z_I}?Lcrzo|biAGF4tfb*D(M=2^&2tmk5l5E4)WXILIB1oyI|z2y7?9Rtiw^-y>C48fu!TQJZOT>3NP4yh#xujr z$ly?}N^MpCf}C>5F~@9@dk(pzYM0!S8<(W=aoOV@b4tIj(TruuW7tDD7)jIJ@7Mi) z-LL!2-TU^o4Hwk~ViHI5NLy|0sopkGZO8JgmSw2T&gLd@)Rwhl>jrVMs#;lAmzLMm zYGrZl0;;-J$7zv*x@B2g2FbMytJBW4HBYk*@-nwO$3D9)&2+QOD1fQ$5ZBgPL|v$t z9uZHY(i;m*f1^zGH!4DZ@Tu1bGncHkAL_|NV%4ZWqhp620ymvpzGo4TiK zhW<13%B4M;uc# zHY&tzIlApxP8~%Hg)QRw0i?goTo%hxbNZ$_!!Z^LJs|I?p3@=0)m7CYUdJ)-Fx=F@ zzW-_Cka!hseWPfa7L9^sx`jg5r>=>9ie*D5rguD@d7T*T64};vb;~)P>IxBLi43xb z4U8GMBb!LZ=!+k2=5YtP;_bbQ8AQ?|uB)3{?_x#9(MH4c6Cg|$g!`XZb`FLO&Ejh=*0-9HCSb59OibKje|!K|%=$8FpX7ldRzanLo#1y6g}< z`{?tQOCeEXRg>?Pl?S%+Vv?!4AT{2 zkY1QKV3;-rBG@x5*cni1ENCZjFxJw`%->_6ED%qAmtMc6Ii&`}yE=KnT%F9{mag_> zdbW2>enZT`8^=8>{8wQsc>D^~a6%rPX@1yg0vDtxTOz5-?IK zt}d3RV#+uS&#%{NQ;_*824`!!>$~VmAK!tYKY)a-ZIOnH%@Xrlrb- z+>0q^U=+_>Y=9W)5?p#3#x18!oJMmmH6nQ$%k0DS0lcn_y$Mln0MPwpdEw$t$D?r( zQJpf$ORo`tMzbn`sFEEMv$wUaH4TDz<1>j&4V0CRDdR4K^_GOlEW(+PHQ`Dg;!mw6 zV{0=1VSk!P7!R#x<~z*M0B!Im3GQ}?{8t$HKZJ`kScAxq7L=6`Vej`xa_GuFXVFxb zwh!S{05@Z92Hx*7_u+CWGJAg&gL6SP;6gruZyhMHk+WX;Uih1FAk_;^Z16ppq~T{= zZ9GNLg0Io`x-Vrje*hSl!BtL&_8kj(T$zG+2g^R=H_fuRl7eJgOdQyu1(TAV6}oF1 z+FpazPI?}Q)GWiOp*4x&Vq(%X%l0RRM3b#Cg{tW}dpy6d!w4N+NNN-fPv$@9Z)25; zakzM9wAg{#pl5Ar3{{i)-ZR5*-+V1`(lD*@Xj(U6m~K)k!Nf21$H#nRlPXhVB5hN*x#j77&yC7Hqeu?#Xz9uO=E-kwcT zC(+Dg{-dMKtf4elorlvjDh<)=asS#3&gH>IOPdvHRLcJQ31^A@*5qS&c(4PmDa zXF_TBMNT!{n;XC%~N{ym5((xOBrEPfNoq5v1NnBIYj(7q}+Va#*%tt~w9 zxYY~&ajtPe&V{ou!rIUjjX2B3kq0MA6OhzR%!?gtC^aMfix`~huE(|=8_sD1v&i*m zxoKeHIUY|Tn$`nT2*I8Ss1mcy73rBgP%(WCl7XyOk`RAJ_L##7WdcU9-R$uGAW;~) z6)Uv9E&lZAo=mxm`|^~uJU91BeA>_XU32c0{J5W^w4gmV3d)cBrBN8B8Ce>KQNFL4 ze~v=3B1G~0h*mbQ0|a77ThM`_;HfhQ<9_sx3_Dl3FN-9N_GJDDI#X}ag>0Z;o`o@- zWL<2>Se<2*i6a|${?qz-%>4iS`^bNuY9|zFOr{#$n$&TNfHWraR#qmFxBpL-AoCnX z*ybqHaC&vExK=&TqbFf(WqoOBacKd&^a)5{D_^eG=+~j{*BZ9-ar$+2yQaTOjTN4MTQs9}dkgQ9SvlIq6m8r?brC^g9quD?aDs-pzH^uW@>nc0B=pf(y zgk$;Z;`v}3=Pxa- z10(;De*Ojh3=i~!{0vJ*^iyY>nVaRC8P&NrMRuR?x;P8d{GNv2_~1=`mR(mWr+atp z*D**2<|O5+h<4TP{iWdo!aCOGdZ|7pyn0`*rvG_2;|) zb^k>luFD11V}pjn+H&(qc3v>KKd>CDWp(A|@bHigVfTJ<~B8UGoQ& z{(*eh=-LbkkMBJk_F9f<^<*Nb^jd7|V_EQ|y*K(6YWqO;gsGANQ2B#m&tZdJqkE8N zc57hv9cxgRyZpKf)GF_u7?Y3{D zUBu6puNCQd6MpjrTweeb9ALWbfsV2N?vuzIl%C~w%e|50&>X@r@uR%0%Akz z4-tsvO}k~iVuK^~73(?D2CSlzcB8`*0XeW0p@nYaJ7$>e#FDr0gVo~;LB0@&Fani1 zv}KvEoQHLi)96|)ZtFydFMk8e&QYHw0Dr|Yne;rx(vvc!xnwn@lpexL%jzAPox~>c zh-U6A%p=Fi^5}ME*M4}0IH9_xbCfv$j+|6ZHsVxaRtT!Z1rf@Q!Q}Xu#Sf9{adJcfHVjx1lw()|4Xv5uwg`MD)M$uhHXpzBD@)m4N zElE)be#eenAgx2_Riis(0!BMacLT{LtWQ`|iut!9z^Ax~A>_p}w-=UFa3#nje;t7M zw3Vf^<98;G8XYZQ?j21SKi$#NRk&bdwCJ+7G2sq2x=C;=lDq=z6IUj!x$1I>Qhy3S zWCZ;rTu`5=<(g4@R#lC9S+AO;rFGn zwR$zr*Mehfd9|d{zGdk=oUJMv5*I6FpFA|V>~UC`T=tl(rWAmY`K8Nn(G_Qg+z|-X zlx#^wv7@lMTP&%%T8l4bBe2>Qo|^hg2*Qu7=A7V!m-aKOIf_kb01VIr$Dl};psR~! zk{)WjFq!t_xbz8xS+6a2Q|LN*_ZJYNyvBGqi)FSv#>XOa+LJh~(|(GfnBxW}vlA>Jl4hv_u3MM5HpDWv^Ll zNYTqc5j!0=NJKgB6Wq<$PxWYPf;5GiaY;8JKKsITMA&1z@HGfyDWzsBmB;a=R2@RX zR0u)6h7g@X_&P-NdM>A`c?4>J0KcmsTnOCwDW{ZkYKeXZ2}nw|qH#c{K7&h7l;EMWG&DFVE)U;xuplVa{Z9uf9=#LHG4RJxM zmkmwbud6y@I`!uetm&9p(av+gj3^o61&z>*YTAN=)E(%6Lo=te_h%aZuup%OH>bI+~QJ_Mx*TDW^4ulH;0vHa} zd2h|yQ~btYs``b12;wII{TLHopFKSDt3V+6_W;?H$~@_|&yhnWd;LF(3|IYfTGXPA zzGp$w{>h~Z&iEvfKNb*ppwAFPVOhyWd0Ht~_PjbL4inU_sx_tH=@gy!-Q~U}eFQ0=`xrgeBxBZ#uS*Ho zR4^Cm`jkOq(vRR;q4Gr4%9M}{tzJ@%J*Ad=sOB*fh>OtU8`2isnBJzVik5q5l!|-B znxQ_WOsB`=5>|cFJ5^1qXnOoCRY@3N30bLsOR%2Dj!SPf-0XtMo`)LIC%a*Cx?I|Z zXluZ*LJ<|v8it{hE1>^xedXmg3YI74wh2|!q%^NN?tAqa#nV{k)A@cn#lS1lyv~=> zRYcl^HM`GR2F5(f+B{E1q;Fu=E0d^#ieViJ+G4{Q8lF^3%D zR3X7oi0DblZBkeIRTZQ-M8PbD>D*)a{SZe<*byJTJIj4R>a%Q)G95{2h_2mE{FQ=l zG@~qPvoUd%e!pw7wrE1_hXKhu!xh^<<8P-p!b8c*mJn+29v*A78@rFJ!2!a(0v-mh;dC= zdI9k^HbXsvu;G3Q^2WcssN^Kz#JM=2aXD7`QJCKbM_7mxt_O?{ftI90*ccrwK7{zW zd+*^~oemPm{uI`5SUY^#!%L#mSNI{1PJc*_a~qwIyaSsv6`nud2=npA=Wx!a8?ifK zDze1MG7z5@;jJ`%xHJZ%Nf=|kit{;y+3Og6h7)TSRZEy&Bmx?`C=P^-hVU?6w}quE zaNf1+)Mu*5!pVJc;!MXm-HFM6F2VVkULp9TiD^dPAGg`TlBVPvQKBt z4(~5i&f4|Ne*|E2)(5HMr5QRqmU;UA&mN5pyo|(WQmNh3cgffm>yL}oD)q>zB82^< ziG`ky{qwA`QXJN(Gd8d_rr8V@jNZzAT`A#+3A>KwTSTIBsoCId`$QMNG}grjC%gD% z>f*ieRVei}ta`ZRbJgw$}}Lrre3GA3o9@b@=FwwCr_F#tCv{Fhqioym+AT1k*nCl>J3QGNJWx@x@q}s5{+#o(Gwg@K?8o#t@ zDDGBdV#lk z2K6H2iy`SlxJ(1HqFyWJjN@mm&<3}+o5^;SdW?Fxh~0mgTAFe0;nW^ZlP7N&*{M&I zQk`o!D{7$YR&hRtilF}JmP(z>% literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php new file mode 100644 index 0000000000000000000000000000000000000000..34530b97c352dfb6feb2dfb6c8ccd8ed5f91f029 GIT binary patch literal 8224 zcmcIpO>7&-70!|pB|TcydX&fv6F8f-TRVb7#*E`6a-3jEu4LNcPe@9s4593b97*d? zT!y=pqZqpM)>8`vz4TC^KPXW2TC|t;-lPQzw5R$|YJI}<&qL<+D>%g zYUjN-@Be)>`_6lv{SI7E)@Yk{4TmBBr%I=5Iab4JDLcL0UD{O|)%v2W*G_U+B9Hvk$f!?qQV5*~npf1Tb=%WNpNV>tM8(X{Jk z+jLB$WqyKI+*EdrmQ9iQB<*gm-Ed5+tuTgCyFo9%q6nFc_F~6Et8XfvLS^O%bi#JN z?a*%9Xl>`H-RPPf$Lf}mbY*3aI==hZo6E1b+cI(Hu5wxExUzCW$(xGP?a|=wiqfS{ zuiL)C^=1N&{ip3y+@*EQZLQt5m=~pIk3 zdcj@dWri7>qReGOg8fCu^NS!*e=5OZwo9=G=xxVzjwG@4{k^w&?Iq*IGf+~q0K$4En7jbz z^kOYv+p2Ho^$+SB#cEm4=2!E2PJV^}L~2@QU9ZX#IRmq+d3@AsRXLYD>C;T7HzF2Kv9T7u7yWfSZQ({YJ)xO=cP94a^G-(=8H z*g6BK@%g?wnA8nqZCQJDY?)6RZhn(OZ*7u`zcD2I>h$P zLt1ACA{$*QphPsCc@mQc-5@O3g4rE&4{;lYn$^$OCpvKx<_An-h`pB_L&{#@&vEJ#M5*`>`#DZ|cp~+HKOG&bKMTQ}-yF$_Hjf=` zqBg$-5yZ2IqtO>(%qp*@<1p*#<+d|##TyJ_REoi{@~QNt_CslsxpMCta7L;>deFt* z7&=yeKZA&ar#->u-Lq-8eqgk*Pc%71=IIb38Uu)UkP$A3rmu`nb|EY&e#AkOA%9W? z+26MA3JY`OmwKcyKZpT&1z70Ivz;T%U*_&u`Z2^+85^rQDe+$kq5+-RTnL;KkR&ub z!TiFI$Xo8jV0dZl#BiO%CkB^^oCj9ZQ+>>=aXAY}%==RyB*4A+_#sJr4`PF!JZf;`X2D|)t6$;mPHw#YzuQ(c8A=6%-v3Z>j|_rqgPMSp)IU%>+r zKLjx@b|yl5_*z-VZE|uL<@CMI6Og*(pDkPL3%o0R{wPvOm$oajx?e1~37ENEDR9IfH4a!TH09jvM1c`Y1ZCFjSy~n$(3xp9O z?^C0REx2plXRX#hmZ9UCv}GQc?2PU^P9g-RKk8YI=pRB#;vz%?294M&@fySiH6@5c zy-VJ@Ki9-{5$llZZzPC_U}7A}YN=AtYC{kJ3lJ0e{SCb)>RH>YlraBiAY7_sv6}HA zTiukKtg3ETOGTMttxaRWuIcih*x`3t+sNfh@@M>cGoRB-^5+tk`&3Q;PEG!^gw;D+ zTXl=`FPy4WyQNp;f6ri*&1@9!6iXiz<^Rm6>u~l&5)u{8vl6Q4)ha8sQ*A)i*6!xZ zq77y6DJ_RHb1-9xR8xN<`DG_?C(&UFu~L)c)z}2-E7+3a$7|?eH3QIp#qL|QY!(%* zpVDkt)5A`aWo|~F7qlXJFeitW5snYQd<<%$S}Rp>xnA9>*7U+q#LgljTrX|puk;T6PmH+@*N9KeS7%pu{jiw2kbNN~lyzI>?73kg>QG9RJy>t9G@x&C6?Bm)!^8qr6y%g3G>ssnFUDXV2aX^s z{Y$=w8ao$YgCY8FQQ(r1WeUlZ3+zZe`r%0l7oIzWnmbBys0+ z?c9i)+`nnbeaGq8E2-4|`}f__@xOo>J!fBh2Y(gsGaZJ5GbX%<*mz`-W#+v}S!NBk zEZu!ev_0>$8GcyXv-+RaaW9;1o_3v`8~w+f2=CFaU-Ca)UJ;*}17D>_ev#&s;>+fgc5N+C~Boh$S7eWPSDTt;B9JNTON=d7j^y>hLNW}qJiZ=GdS>fzj>vcsz z{Y^;R`7iw)oLH}&q@s<~T;e$M-n@DHX5a5eqX?dpBjhNlLZ1xIi5ek^q)@^WAsHmY zAxh$jal}HDHX-c}`P4Zj2kn#7XBrxdM0(gDfe=B6buSc&U-zk^QHbB`XIphmXj<+b83Ol1O5nD00{6?-E`S%(I40dG5&Q(AKT$FWnMYzp zmHv9c;y&X{F&eTTdXgp?(lAC1zg{~`xTl!lBn5Q1hqXtTOIN9P5@e><`n>7>Skbck^w# z!eF1w;3jg~f+jrp|E+ZoiZk+Z`cvm$s_J5DhgE?k)aSKiytxaIj@p-$2k3l*$9l-Q zTAcf{JHRYuxA1i*OV8xgwMBuL-9OqleFaU-j0U^2$H7XJ?)BS^X@*~CyLe@F=dP`( L%$Dl{E&%=kPEx~dp#2a11ATE{{n|_?lc%2D1wc?2l5(AyPU{DgTI~67&e?Nc{_6A2 zeh03L>!eLA)gijLb0j+ZMC@3mV`^qg-0AM_5=+#~gO1T6R$3Gb6|r1th;pIW_y|dD zvukN2EAE-*UW=@1Ewihy>Z+r5TIAL0;oVh>@GW+lfdaJE17denjfm^j+$M2Ux_f(_ z(QoG|{dU2n-+p@cA%NCWZCk8)IPeXK_^;F5X&IVmJF0^pHw;@b+Jb<$qbgMes$sj>c8JwhTiXRr1N!0^6kJMA@=v2Ns3SG1q)Z#mkHVm`?M?L7AP0LQ;&S!?J zZ%NmE^{$~2uJ{U}>bVJj`3zP@wLT%iccz)0rae1NAKpzayBKQ6@NJfxZ1Sr6h#4@N z!m94d?moYE^10&)$Ty^Zn1Hd8`jQA47^CK&2#KMUsoae>Qsf8eDqQjT;6TWNoko{i zWi-n$ts8cyr5-7aHq2-vZ={eAhe+4Z6A^DEBHV|VW)XB{h4PRX!zZy!GR<*0Hz+{b zKY<+LFsg0`nQ*D1qfvbh<1KZEwCu#V7{S-v_Fi*JxoIj0{zo^J0YP}aJ3Vvm7*d_IUocT)ztHs^2?;yw=^%05F$ zpO4bdN&qhT5ls0k3YTHRmEN^3s^aALA(->`a9SbnDVJK|Z07#OUY({WM3{pKbYffG zBMD}Z!YagqHbiZ5pyi?QPLj6XG11SNold1n5ar+tFkf#-4OwZH>s2{lTr0|j_y@uy zjFl^8IUW+GAX<~9!d5&iOv7ZeT96vW@_IZ%AIP;@r4}Dc-ho)a;)EDPUXmlO8({{b zhia?q@}3Pp2xXtWl^R1l@jeEC7esUH)oE%&3^J4$-QqJ=sj(QDOTgT(gPRwG8J->6n-cj}*1jX&o8uJ#QyHglOu! z7>s>owl5rg7|s7e^r3?M=+Wm>7;}y~goT{h%=Pn~igDAxt-0|xQuvJ&6^by65neM7 ziFKsd9iq9R<&z;G1&^qXG(1MF!;DvOaU>pIel`Tjs{=fsFow(iU}rEpy+E)_{xt;C zL0sV(%y=%MFjevR^WXx!rAw~61@)Jz!E|t4_z;#$l{|)oN?B=aRZoVId6=nVv?$3+ zO+fCQM9HNjuw$gd~u)@jt8|yIr!ZzDJCQs(W zl-!T`1p@SeF2SU&?GwG*A_+iC;L>e;kbDi$V}K^~eWL2bQY`apo2ek6&;aJAr9n*0nL?$ZF{+r z<}aN%m<30yFtH@%H7_;9soYOl%`3vy^J-p~Wz;K8pIBOsUMV9D72Pc)hgR22(f1+B z(kiPor*a=N_O8K)=dwq0u&{^`8+%m6i)S{5ee`+Z30yMTSXmgl!k+J%)`99Umx*OE zLv>!{v;~A-W0V^o2+tvb0S5bTEHkJ-FkI@42WldQ%86wL#0&QJcMw0j3YoYG^G&8BWYFxB&^x<#dx1Q6>?kg!QtE;$^kO zEJOPFP{v#&F9RXkQ&{M>)vmK|T69LB_>glW%GwN22XJ@b%C3rysji$^k0llue0C_u zYYe3B)^t@?(n++UL*9P_%Y6rBT6=2Sc+E=B#3FmafDrGS0W(di+)98R!}vUQ30%>h zT**bae3rb)+pv5tqcm1Px9*73F*-T;R8K2E-nmc5kVWl=dw3}g zgwv~-;ICDsTBFEnw0fh~%r}~~lagJ6xqPKuFV-7!xuJY1Z`DyaT-+!=m6dv93oAIb z7*5VWED$-8%dixXIB4ssU6}MUTLLa)l_;-QYFj5d%_X>0lk1gcEiWsZQdwG;H<1PY z_PUIjyx7=Ms+CePPg_s{X0ZX4ltQtduRN7&Tk%NtPvN)HAHqY^ocvCCUS(+=Gd=%u zEY#i!CRi@4p2Ae$114)&kxlw}eCidn?7~_C!=9b`b^)Ri%dPkNW@IBK_3?=z z*?>-riT|VbsT(IdM4e@iL8+M@OWI2ey%wGUoh7042Ww?%)Um5_b6qEV>9Bl=bW{d3~hCEw4S8NzlUJ9 zpXUpV=r=xzHLn{ZS?p0xf`k_;yEG;qmO(bXMm0BCv&||8vH!3wO2$Wni|D{Z8 z0&M+r#q}pmO#BM11M0XMMqh#+wD1#HlJa@EURSU(J6Y!dj2DVEIZwfGP{0cg926w~ ziIKwB0E-|Ojuidm?<-OWH(=>NZR7OcKLA4~ZR{P7_$;4A;S@I40|)wnc;XN4!^!U= zFxLyiT{5qn4--}p;^LFR|v0(V#TsjtyR{so~~o2KwGa$%{o4e z&^`rAW(k{?LOgoG!CTgOEB$WRn5O!^OW51bhlr2jN%;o$Cn!6Lm&aQwb~DB9sS0vQ zcJHaMi=q2)KwXocG|~AB@v+% BwORlG literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php new file mode 100644 index 000000000000..ca7d63a45e79 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + ' +µ +\'google/cloud/dataplex/v1/security.protogoogle.cloud.dataplex.v1"U +ResourceAccessSpec +readers ( BàA +writers ( BàA +owners ( BàA"& +DataAccessSpec +readers ( BàABi +com.google.cloud.dataplex.v1B SecurityProtoPZ8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php new file mode 100644 index 000000000000..a5512d8018dc --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php @@ -0,0 +1,301 @@ +internalAddGeneratedFile( + ' +•b +&google/cloud/dataplex/v1/service.protogoogle.cloud.dataplex.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/dataplex/v1/analyze.proto(google/cloud/dataplex/v1/resources.proto$google/cloud/dataplex/v1/tasks.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"³ +CreateLakeRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location +lake_id ( BàA1 +lake ( 2.google.cloud.dataplex.v1.LakeBàA + validate_only (BàA"˜ +UpdateLakeRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA1 +lake ( 2.google.cloud.dataplex.v1.LakeBàA + validate_only (BàA"G +DeleteLakeRequest2 +name ( B$àAúA +dataplex.googleapis.com/Lake"ª +ListLakesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"z +ListLakesResponse- +lakes ( 2.google.cloud.dataplex.v1.Lake +next_page_token (  +unreachable_locations ( " +ListLakeActionsRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Lake + page_size (BàA + +page_token ( BàA"a +ListActionsResponse1 +actions ( 2 .google.cloud.dataplex.v1.Action +next_page_token ( "D +GetLakeRequest2 +name ( B$àAúA +dataplex.googleapis.com/Lake"® +CreateZoneRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Lake +zone_id ( BàA1 +zone ( 2.google.cloud.dataplex.v1.ZoneBàA + validate_only (BàA"˜ +UpdateZoneRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA1 +zone ( 2.google.cloud.dataplex.v1.ZoneBàA + validate_only (BàA"G +DeleteZoneRequest2 +name ( B$àAúA +dataplex.googleapis.com/Zone"¥ +ListZonesRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Lake + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"[ +ListZonesResponse- +zones ( 2.google.cloud.dataplex.v1.Zone +next_page_token ( " +ListZoneActionsRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Zone + page_size (BàA + +page_token ( BàA"D +GetZoneRequest2 +name ( B$àAúA +dataplex.googleapis.com/Zone"² +CreateAssetRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Zone +asset_id ( BàA3 +asset ( 2.google.cloud.dataplex.v1.AssetBàA + validate_only (BàA"› +UpdateAssetRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA3 +asset ( 2.google.cloud.dataplex.v1.AssetBàA + validate_only (BàA"I +DeleteAssetRequest3 +name ( B%àAúA +dataplex.googleapis.com/Asset"¦ +ListAssetsRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Zone + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"^ +ListAssetsResponse/ +assets ( 2.google.cloud.dataplex.v1.Asset +next_page_token ( " +ListAssetActionsRequest5 +parent ( B%àAúA +dataplex.googleapis.com/Asset + page_size (BàA + +page_token ( BàA"F +GetAssetRequest3 +name ( B%àAúA +dataplex.googleapis.com/Asset"€ +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA +status_message ( BàA# +requested_cancellation (BàA + api_version ( BàA"® +CreateTaskRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Lake +task_id ( BàA1 +task ( 2.google.cloud.dataplex.v1.TaskBàA + validate_only (BàA"˜ +UpdateTaskRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA1 +task ( 2.google.cloud.dataplex.v1.TaskBàA + validate_only (BàA"G +DeleteTaskRequest2 +name ( B$àAúA +dataplex.googleapis.com/Task"¥ +ListTasksRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Lake + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"z +ListTasksResponse- +tasks ( 2.google.cloud.dataplex.v1.Task +next_page_token (  +unreachable_locations ( "D +GetTaskRequest2 +name ( B$àAúA +dataplex.googleapis.com/Task"B + GetJobRequest1 +name ( B#àAúA +dataplex.googleapis.com/Job"² +RunTaskRequest2 +name ( B$àAúA +dataplex.googleapis.com/TaskI +labels ( 24.google.cloud.dataplex.v1.RunTaskRequest.LabelsEntryBàAE +args ( 22.google.cloud.dataplex.v1.RunTaskRequest.ArgsEntryBàA- + LabelsEntry +key (  +value ( :8+ + ArgsEntry +key (  +value ( :8"= +RunTaskResponse* +job ( 2.google.cloud.dataplex.v1.Job"x +ListJobsRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Task + page_size (BàA + +page_token ( BàA"X +ListJobsResponse+ +jobs ( 2.google.cloud.dataplex.v1.Job +next_page_token ( "E +CancelJobRequest1 +name ( B#àAúA +dataplex.googleapis.com/Job"Ê +CreateEnvironmentRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Lake +environment_id ( BàA? + environment ( 2%.google.cloud.dataplex.v1.EnvironmentBàA + validate_only (BàA"­ +UpdateEnvironmentRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA? + environment ( 2%.google.cloud.dataplex.v1.EnvironmentBàA + validate_only (BàA"U +DeleteEnvironmentRequest9 +name ( B+àAúA% +#dataplex.googleapis.com/Environment"¬ +ListEnvironmentsRequest4 +parent ( B$àAúA +dataplex.googleapis.com/Lake + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"p +ListEnvironmentsResponse; + environments ( 2%.google.cloud.dataplex.v1.Environment +next_page_token ( "R +GetEnvironmentRequest9 +name ( B+àAúA% +#dataplex.googleapis.com/Environment"˜ +ListSessionsRequest; +parent ( B+àAúA% +#dataplex.googleapis.com/Environment + page_size (BàA + +page_token ( BàA +filter ( BàA"d +ListSessionsResponse3 +sessions ( 2!.google.cloud.dataplex.v1.Session +next_page_token ( 2¬2 +DataplexServiceà + +CreateLake+.google.cloud.dataplex.v1.CreateLakeRequest.google.longrunning.Operation"i‚Óä“1")/v1/{parent=projects/*/locations/*}/lakes:lakeÚAparent,lake,lake_idÊA +LakeOperationMetadataÅ + +UpdateLake+.google.cloud.dataplex.v1.UpdateLakeRequest.google.longrunning.Operation"k‚Óä“62./v1/{lake.name=projects/*/locations/*/lakes/*}:lakeÚAlake,update_maskÊA +LakeOperationMetadata¿ + +DeleteLake+.google.cloud.dataplex.v1.DeleteLakeRequest.google.longrunning.Operation"e‚Óä“+*)/v1/{name=projects/*/locations/*/lakes/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadata  + ListLakes*.google.cloud.dataplex.v1.ListLakesRequest+.google.cloud.dataplex.v1.ListLakesResponse":‚Óä“+)/v1/{parent=projects/*/locations/*}/lakesÚAparent +GetLake(.google.cloud.dataplex.v1.GetLakeRequest.google.cloud.dataplex.v1.Lake"8‚Óä“+)/v1/{name=projects/*/locations/*/lakes/*}ÚAname¸ +ListLakeActions0.google.cloud.dataplex.v1.ListLakeActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"D‚Óä“53/v1/{parent=projects/*/locations/*/lakes/*}/actionsÚAparentË + +CreateZone+.google.cloud.dataplex.v1.CreateZoneRequest.google.longrunning.Operation"q‚Óä“9"1/v1/{parent=projects/*/locations/*/lakes/*}/zones:zoneÚAparent,zone,zone_idÊA +ZoneOperationMetadataÍ + +UpdateZone+.google.cloud.dataplex.v1.UpdateZoneRequest.google.longrunning.Operation"s‚Óä“>26/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}:zoneÚAzone,update_maskÊA +ZoneOperationMetadataÇ + +DeleteZone+.google.cloud.dataplex.v1.DeleteZoneRequest.google.longrunning.Operation"m‚Óä“3*1/v1/{name=projects/*/locations/*/lakes/*/zones/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadata¨ + ListZones*.google.cloud.dataplex.v1.ListZonesRequest+.google.cloud.dataplex.v1.ListZonesResponse"B‚Óä“31/v1/{parent=projects/*/locations/*/lakes/*}/zonesÚAparent• +GetZone(.google.cloud.dataplex.v1.GetZoneRequest.google.cloud.dataplex.v1.Zone"@‚Óä“31/v1/{name=projects/*/locations/*/lakes/*/zones/*}ÚAnameÀ +ListZoneActions0.google.cloud.dataplex.v1.ListZoneActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"L‚Óä“=;/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actionsÚAparentÚ + CreateAsset,.google.cloud.dataplex.v1.CreateAssetRequest.google.longrunning.Operation"~‚Óä“C":/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets:assetÚAparent,asset,asset_idÊA +AssetOperationMetadataÝ + UpdateAsset,.google.cloud.dataplex.v1.UpdateAssetRequest.google.longrunning.Operation"€‚Óä“I2@/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}:assetÚAasset,update_maskÊA +AssetOperationMetadataÒ + DeleteAsset,.google.cloud.dataplex.v1.DeleteAssetRequest.google.longrunning.Operation"v‚Óä“<*:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadata´ + +ListAssets+.google.cloud.dataplex.v1.ListAssetsRequest,.google.cloud.dataplex.v1.ListAssetsResponse"K‚Óä“<:/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assetsÚAparent¡ +GetAsset).google.cloud.dataplex.v1.GetAssetRequest.google.cloud.dataplex.v1.Asset"I‚Óä“<:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}ÚAnameË +ListAssetActions1.google.cloud.dataplex.v1.ListAssetActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"U‚Óä“FD/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actionsÚAparentË + +CreateTask+.google.cloud.dataplex.v1.CreateTaskRequest.google.longrunning.Operation"q‚Óä“9"1/v1/{parent=projects/*/locations/*/lakes/*}/tasks:taskÚAparent,task,task_idÊA +TaskOperationMetadataÍ + +UpdateTask+.google.cloud.dataplex.v1.UpdateTaskRequest.google.longrunning.Operation"s‚Óä“>26/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}:taskÚAtask,update_maskÊA +TaskOperationMetadataÇ + +DeleteTask+.google.cloud.dataplex.v1.DeleteTaskRequest.google.longrunning.Operation"m‚Óä“3*1/v1/{name=projects/*/locations/*/lakes/*/tasks/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadata¨ + ListTasks*.google.cloud.dataplex.v1.ListTasksRequest+.google.cloud.dataplex.v1.ListTasksResponse"B‚Óä“31/v1/{parent=projects/*/locations/*/lakes/*}/tasksÚAparent• +GetTask(.google.cloud.dataplex.v1.GetTaskRequest.google.cloud.dataplex.v1.Task"@‚Óä“31/v1/{name=projects/*/locations/*/lakes/*/tasks/*}ÚAname¬ +ListJobs).google.cloud.dataplex.v1.ListJobsRequest*.google.cloud.dataplex.v1.ListJobsResponse"I‚Óä“:8/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobsÚAparent§ +RunTask(.google.cloud.dataplex.v1.RunTaskRequest).google.cloud.dataplex.v1.RunTaskResponse"G‚Óä“:"5/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run:*ÚAname™ +GetJob\'.google.cloud.dataplex.v1.GetJobRequest.google.cloud.dataplex.v1.Job"G‚Óä“:8/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}ÚAname¢ + CancelJob*.google.cloud.dataplex.v1.CancelJobRequest.google.protobuf.Empty"Q‚Óä“D"?/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel:*ÚAnameý +CreateEnvironment2.google.cloud.dataplex.v1.CreateEnvironmentRequest.google.longrunning.Operation"”‚Óä“G"8/v1/{parent=projects/*/locations/*/lakes/*}/environments: environmentÚA!parent,environment,environment_idÊA + EnvironmentOperationMetadataÿ +UpdateEnvironment2.google.cloud.dataplex.v1.UpdateEnvironmentRequest.google.longrunning.Operation"–‚Óä“S2D/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}: environmentÚAenvironment,update_maskÊA + EnvironmentOperationMetadataÜ +DeleteEnvironment2.google.cloud.dataplex.v1.DeleteEnvironmentRequest.google.longrunning.Operation"t‚Óä“:*8/v1/{name=projects/*/locations/*/lakes/*/environments/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataÄ +ListEnvironments1.google.cloud.dataplex.v1.ListEnvironmentsRequest2.google.cloud.dataplex.v1.ListEnvironmentsResponse"I‚Óä“:8/v1/{parent=projects/*/locations/*/lakes/*}/environmentsÚAparent± +GetEnvironment/.google.cloud.dataplex.v1.GetEnvironmentRequest%.google.cloud.dataplex.v1.Environment"G‚Óä“:8/v1/{name=projects/*/locations/*/lakes/*/environments/*}ÚAnameà + ListSessions-.google.cloud.dataplex.v1.ListSessionsRequest..google.cloud.dataplex.v1.ListSessionsResponse"T‚Óä“EC/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessionsÚAparentKÊAdataplex.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBh +com.google.cloud.dataplex.v1B ServiceProtoPZ8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php new file mode 100644 index 0000000000000000000000000000000000000000..e1eb3b051c3159d116c84c623fd0fec37971a01c GIT binary patch literal 4969 zcmbtYPjlPW5jRQkkCwKiz_CLkPJ+trL~au@k~3+Bj+26aBr{Pcm86`c!x;<+K2k6t z0Kp&Csz=jXzd?J*rM>jl$)%s6hklEk^AURL?t1`8iIOS1I*7n~Z};un{q1k};j=H? zLl^ETJIrRD9gK#uro?m=K6M6&&-n~wktOZR=HM>^mIDEQ}w1IsiNKhOjGxo`TKX`6wmTjn3p{>RElw|s_@ z^J_<;Z3L!cDuoMeXPXR?2`-d`2Ch0FwfSleuMdjXS#vo?c>sF zbw ztg%D=*mS&Vb$Y6)lFLLpEQ;HerRIXuk9GK0-#YPWBSg4iC|*OfXCj0G{m8vomWT1f z&&?=k>TsCEXd4l{k$9DS{673$f%{j1u2d4M${gV37~tjOP5DkFue)Z&i~K6^E^l0_ zI$juMhWu`{lIIDct}=`~6lr?z{Cp6*K`dDR+ih5)G?BJoiL$JeQc@eswfjG*ng6Qq z!rjDTp$Luj%b3*_F0%%i&>WW1TqJ`c(#KFVJcg8@(MF{V&J?%gvJe(qqLt+&7`0d` zbaAIhYUyfHB`6M~)IvyB=yCM~sKg*|6RNGTu`F|O!?1@<&!p{c4itj(yxqlSLzKNS1oR{6@>xR`L!Z_%%= z?oCSnBs45m(xt`Zth!^5%<+?J(l!)qCtw4|nUsDMN;Vf*(vH^8>XCoQfz+}`p6(-A z8c2?ePAz>4*?}Gyhoz6XeLD+O&ub{xNW6{}Eeu#fVrcjPRt?7vbQ6oAW*+HdRuW-( zjXlsCLQ#wKbV8fb=t)ZILGjo%G@Au~aL~zr6_NVv)erI1HQGYSleGK|+`8~k(p^{; z=x{t=GaNL7^FmgjS%I5J`g8643W}LnA^$lIw=O)2BtcfVNbn5Lj@z*OOh4AOXS(Mj znPiZE_&8eOo&<-8bu9f8^oNgxlFYgQ$a*gG0uv{ecw&C@>JGWk%raJ-Nb@v{_mUueC-CI!b zjYBpJEyfvCz~srb^(xjdG)H<9)_ULVH?@OycfVP0ZMT|@wQCrb<-NAnXnw7>8*3?g z?KJBLoldL0vz8|3;6_Bv@?X+$;|x_I;V$VOI$faalLhWMBU@Hca0(tuDW7@ArolAb z5Gj>ZtTbAlM=(EQM!*joB|r^ia>X-e5G5P&zGaRWFRlgd<~y-bD9;53e`=gN@g^QtPyWKn-!EWx@R1k$J{0nyU3qi zxM`lL45Ek%ye=v>^A&+RxK@DN(8Jw4`CloJ=1UUcJSl91b8bvpy2KdKGQFlT$S^Zb z$xg}gyi;8@HodTCvbn4<}`>`u_ai0KK*fRM60hWWUxb;qq&iVf8OJ_h1%*Y=? zai(EfgvRRdXH{R&m#R@N`IQ&Z(`m(W41RUMvG@@O^$DW^{5cgj&dQ4bo03zCDi(F@ zOxFLMhYZ>(ZJue6@9_rt9eDe)2AM?W`{T1jc}2%=LV?*s!L3*9jeirjxx_ImTlZcX zhS^pZ*_W92B&zz98aH^Dq(_jC2rTNIf4M-ZU^^jx4_?0441N-0BUUdJxd#>)8&x(TJl|%Ee*Kl(>{rG1`bUuO3b#pb!Od>7 z^R!hzU(T*Wp`rHF{mx!}Ew%1JmS0qmW!~ua)ZY2kMaXv!+HIU{ZguhQ!bU*d`PX%E`7gxIRj-BcEDZB>bC#pF0-NB>j;~google.cloud.dataplex.v1.Action + */ +class Action extends \Google\Protobuf\Internal\Message +{ + /** + * The category of issue associated with the action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; + */ + protected $category = 0; + /** + * Detailed description of the issue requiring action. + * + * Generated from protobuf field string issue = 2; + */ + protected $issue = ''; + /** + * The time that the issue was detected. + * + * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; + */ + protected $detect_time = null; + /** + * Output only. The relative resource name of the action, of the form: + * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $lake = ''; + /** + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $zone = ''; + /** + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $asset = ''; + /** + * The list of data locations associated with this action. Cloud Storage + * locations are represented as URI paths(E.g. + * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + * resource names(E.g. + * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + * + * Generated from protobuf field repeated string data_locations = 9; + */ + private $data_locations; + protected $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $category + * The category of issue associated with the action. + * @type string $issue + * Detailed description of the issue requiring action. + * @type \Google\Protobuf\Timestamp $detect_time + * The time that the issue was detected. + * @type string $name + * Output only. The relative resource name of the action, of the form: + * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + * @type string $lake + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @type string $zone + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @type string $asset + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations + * The list of data locations associated with this action. Cloud Storage + * locations are represented as URI paths(E.g. + * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + * resource names(E.g. + * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat $invalid_data_format + * Details for issues related to invalid or unsupported data formats. + * @type \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema $incompatible_data_schema + * Details for issues related to incompatible schemas detected within data. + * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition $invalid_data_partition + * Details for issues related to invalid or unsupported data partition + * structure. + * @type \Google\Cloud\Dataplex\V1\Action\MissingData $missing_data + * Details for issues related to absence of data within managed resources. + * @type \Google\Cloud\Dataplex\V1\Action\MissingResource $missing_resource + * Details for issues related to absence of a managed resource. + * @type \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource $unauthorized_resource + * Details for issues related to lack of permissions to access data + * resources. + * @type \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply $failed_security_policy_apply + * Details for issues related to applying security policy. + * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization $invalid_data_organization + * Details for issues related to invalid data arrangement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The category of issue associated with the action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; + * @return int + */ + public function getCategory() + { + return $this->category; + } + + /** + * The category of issue associated with the action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; + * @param int $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\Category::class); + $this->category = $var; + + return $this; + } + + /** + * Detailed description of the issue requiring action. + * + * Generated from protobuf field string issue = 2; + * @return string + */ + public function getIssue() + { + return $this->issue; + } + + /** + * Detailed description of the issue requiring action. + * + * Generated from protobuf field string issue = 2; + * @param string $var + * @return $this + */ + public function setIssue($var) + { + GPBUtil::checkString($var, True); + $this->issue = $var; + + return $this; + } + + /** + * The time that the issue was detected. + * + * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDetectTime() + { + return $this->detect_time; + } + + public function hasDetectTime() + { + return isset($this->detect_time); + } + + public function clearDetectTime() + { + unset($this->detect_time); + } + + /** + * The time that the issue was detected. + * + * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDetectTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->detect_time = $var; + + return $this; + } + + /** + * Output only. The relative resource name of the action, of the form: + * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the action, of the form: + * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getLake() + { + return $this->lake; + } + + /** + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLake($var) + { + GPBUtil::checkString($var, True); + $this->lake = $var; + + return $this; + } + + /** + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->asset = $var; + + return $this; + } + + /** + * The list of data locations associated with this action. Cloud Storage + * locations are represented as URI paths(E.g. + * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + * resource names(E.g. + * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + * + * Generated from protobuf field repeated string data_locations = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataLocations() + { + return $this->data_locations; + } + + /** + * The list of data locations associated with this action. Cloud Storage + * locations are represented as URI paths(E.g. + * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + * resource names(E.g. + * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + * + * Generated from protobuf field repeated string data_locations = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_locations = $arr; + + return $this; + } + + /** + * Details for issues related to invalid or unsupported data formats. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataFormat invalid_data_format = 10; + * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat|null + */ + public function getInvalidDataFormat() + { + return $this->readOneof(10); + } + + public function hasInvalidDataFormat() + { + return $this->hasOneof(10); + } + + /** + * Details for issues related to invalid or unsupported data formats. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataFormat invalid_data_format = 10; + * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat $var + * @return $this + */ + public function setInvalidDataFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Details for issues related to incompatible schemas detected within data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema incompatible_data_schema = 11; + * @return \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema|null + */ + public function getIncompatibleDataSchema() + { + return $this->readOneof(11); + } + + public function hasIncompatibleDataSchema() + { + return $this->hasOneof(11); + } + + /** + * Details for issues related to incompatible schemas detected within data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema incompatible_data_schema = 11; + * @param \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema $var + * @return $this + */ + public function setIncompatibleDataSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Details for issues related to invalid or unsupported data partition + * structure. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition invalid_data_partition = 12; + * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition|null + */ + public function getInvalidDataPartition() + { + return $this->readOneof(12); + } + + public function hasInvalidDataPartition() + { + return $this->hasOneof(12); + } + + /** + * Details for issues related to invalid or unsupported data partition + * structure. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition invalid_data_partition = 12; + * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition $var + * @return $this + */ + public function setInvalidDataPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Details for issues related to absence of data within managed resources. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingData missing_data = 13; + * @return \Google\Cloud\Dataplex\V1\Action\MissingData|null + */ + public function getMissingData() + { + return $this->readOneof(13); + } + + public function hasMissingData() + { + return $this->hasOneof(13); + } + + /** + * Details for issues related to absence of data within managed resources. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingData missing_data = 13; + * @param \Google\Cloud\Dataplex\V1\Action\MissingData $var + * @return $this + */ + public function setMissingData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\MissingData::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Details for issues related to absence of a managed resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingResource missing_resource = 14; + * @return \Google\Cloud\Dataplex\V1\Action\MissingResource|null + */ + public function getMissingResource() + { + return $this->readOneof(14); + } + + public function hasMissingResource() + { + return $this->hasOneof(14); + } + + /** + * Details for issues related to absence of a managed resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingResource missing_resource = 14; + * @param \Google\Cloud\Dataplex\V1\Action\MissingResource $var + * @return $this + */ + public function setMissingResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\MissingResource::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Details for issues related to lack of permissions to access data + * resources. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.UnauthorizedResource unauthorized_resource = 15; + * @return \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource|null + */ + public function getUnauthorizedResource() + { + return $this->readOneof(15); + } + + public function hasUnauthorizedResource() + { + return $this->hasOneof(15); + } + + /** + * Details for issues related to lack of permissions to access data + * resources. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.UnauthorizedResource unauthorized_resource = 15; + * @param \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource $var + * @return $this + */ + public function setUnauthorizedResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Details for issues related to applying security policy. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply failed_security_policy_apply = 21; + * @return \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply|null + */ + public function getFailedSecurityPolicyApply() + { + return $this->readOneof(21); + } + + public function hasFailedSecurityPolicyApply() + { + return $this->hasOneof(21); + } + + /** + * Details for issues related to applying security policy. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply failed_security_policy_apply = 21; + * @param \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply $var + * @return $this + */ + public function setFailedSecurityPolicyApply($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Details for issues related to invalid data arrangement. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataOrganization invalid_data_organization = 22; + * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization|null + */ + public function getInvalidDataOrganization() + { + return $this->readOneof(22); + } + + public function hasInvalidDataOrganization() + { + return $this->hasOneof(22); + } + + /** + * Details for issues related to invalid data arrangement. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataOrganization invalid_data_organization = 22; + * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization $var + * @return $this + */ + public function setInvalidDataOrganization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * @return string + */ + public function getDetails() + { + return $this->whichOneof("details"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php new file mode 100644 index 000000000000..ce9240e40a4a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php @@ -0,0 +1,71 @@ +google.cloud.dataplex.v1.Action.Category + */ +class Category +{ + /** + * Unspecified category. + * + * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; + */ + const CATEGORY_UNSPECIFIED = 0; + /** + * Resource management related issues. + * + * Generated from protobuf enum RESOURCE_MANAGEMENT = 1; + */ + const RESOURCE_MANAGEMENT = 1; + /** + * Security policy related issues. + * + * Generated from protobuf enum SECURITY_POLICY = 2; + */ + const SECURITY_POLICY = 2; + /** + * Data and discovery related issues. + * + * Generated from protobuf enum DATA_DISCOVERY = 3; + */ + const DATA_DISCOVERY = 3; + + private static $valueToName = [ + self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', + self::RESOURCE_MANAGEMENT => 'RESOURCE_MANAGEMENT', + self::SECURITY_POLICY => 'SECURITY_POLICY', + self::DATA_DISCOVERY => 'DATA_DISCOVERY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Category::class, \Google\Cloud\Dataplex\V1\Action_Category::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php new file mode 100644 index 000000000000..4b04784bc750 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php @@ -0,0 +1,77 @@ +google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + */ +class FailedSecurityPolicyApply extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of one of the assets with failing security policy + * application. Populated for a lake or zone resource only. + * + * Generated from protobuf field string asset = 1; + */ + protected $asset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $asset + * Resource name of one of the assets with failing security policy + * application. Populated for a lake or zone resource only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of one of the assets with failing security policy + * application. Populated for a lake or zone resource only. + * + * Generated from protobuf field string asset = 1; + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Resource name of one of the assets with failing security policy + * application. Populated for a lake or zone resource only. + * + * Generated from protobuf field string asset = 1; + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->asset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FailedSecurityPolicyApply::class, \Google\Cloud\Dataplex\V1\Action_FailedSecurityPolicyApply::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php new file mode 100644 index 000000000000..cd0596053a2c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php @@ -0,0 +1,218 @@ +google.cloud.dataplex.v1.Action.IncompatibleDataSchema + */ +class IncompatibleDataSchema extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the table containing invalid data. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * The existing and expected schema of the table. The schema is provided as + * a JSON formatted structure listing columns and data types. + * + * Generated from protobuf field string existing_schema = 2; + */ + protected $existing_schema = ''; + /** + * The new and incompatible schema within the table. The schema is provided + * as a JSON formatted structured listing columns and data types. + * + * Generated from protobuf field string new_schema = 3; + */ + protected $new_schema = ''; + /** + * The list of data locations sampled and used for format/schema + * inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 4; + */ + private $sampled_data_locations; + /** + * Whether the action relates to a schema that is incompatible or modified. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; + */ + protected $schema_change = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * The name of the table containing invalid data. + * @type string $existing_schema + * The existing and expected schema of the table. The schema is provided as + * a JSON formatted structure listing columns and data types. + * @type string $new_schema + * The new and incompatible schema within the table. The schema is provided + * as a JSON formatted structured listing columns and data types. + * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations + * The list of data locations sampled and used for format/schema + * inference. + * @type int $schema_change + * Whether the action relates to a schema that is incompatible or modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the table containing invalid data. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * The name of the table containing invalid data. + * + * Generated from protobuf field string table = 1; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + + /** + * The existing and expected schema of the table. The schema is provided as + * a JSON formatted structure listing columns and data types. + * + * Generated from protobuf field string existing_schema = 2; + * @return string + */ + public function getExistingSchema() + { + return $this->existing_schema; + } + + /** + * The existing and expected schema of the table. The schema is provided as + * a JSON formatted structure listing columns and data types. + * + * Generated from protobuf field string existing_schema = 2; + * @param string $var + * @return $this + */ + public function setExistingSchema($var) + { + GPBUtil::checkString($var, True); + $this->existing_schema = $var; + + return $this; + } + + /** + * The new and incompatible schema within the table. The schema is provided + * as a JSON formatted structured listing columns and data types. + * + * Generated from protobuf field string new_schema = 3; + * @return string + */ + public function getNewSchema() + { + return $this->new_schema; + } + + /** + * The new and incompatible schema within the table. The schema is provided + * as a JSON formatted structured listing columns and data types. + * + * Generated from protobuf field string new_schema = 3; + * @param string $var + * @return $this + */ + public function setNewSchema($var) + { + GPBUtil::checkString($var, True); + $this->new_schema = $var; + + return $this; + } + + /** + * The list of data locations sampled and used for format/schema + * inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSampledDataLocations() + { + return $this->sampled_data_locations; + } + + /** + * The list of data locations sampled and used for format/schema + * inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSampledDataLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->sampled_data_locations = $arr; + + return $this; + } + + /** + * Whether the action relates to a schema that is incompatible or modified. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; + * @return int + */ + public function getSchemaChange() + { + return $this->schema_change; + } + + /** + * Whether the action relates to a schema that is incompatible or modified. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; + * @param int $var + * @return $this + */ + public function setSchemaChange($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema\SchemaChange::class); + $this->schema_change = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IncompatibleDataSchema::class, \Google\Cloud\Dataplex\V1\Action_IncompatibleDataSchema::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php new file mode 100644 index 000000000000..e9b83fdb588c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php @@ -0,0 +1,65 @@ +google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange + */ +class SchemaChange +{ + /** + * Schema change unspecified. + * + * Generated from protobuf enum SCHEMA_CHANGE_UNSPECIFIED = 0; + */ + const SCHEMA_CHANGE_UNSPECIFIED = 0; + /** + * Newly discovered schema is incompatible with existing schema. + * + * Generated from protobuf enum INCOMPATIBLE = 1; + */ + const INCOMPATIBLE = 1; + /** + * Newly discovered schema has changed from existing schema for data in a + * curated zone. + * + * Generated from protobuf enum MODIFIED = 2; + */ + const MODIFIED = 2; + + private static $valueToName = [ + self::SCHEMA_CHANGE_UNSPECIFIED => 'SCHEMA_CHANGE_UNSPECIFIED', + self::INCOMPATIBLE => 'INCOMPATIBLE', + self::MODIFIED => 'MODIFIED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SchemaChange::class, \Google\Cloud\Dataplex\V1\Action_IncompatibleDataSchema_SchemaChange::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php new file mode 100644 index 000000000000..f1c8b0a2da3c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php @@ -0,0 +1,142 @@ +google.cloud.dataplex.v1.Action.InvalidDataFormat + */ +class InvalidDataFormat extends \Google\Protobuf\Internal\Message +{ + /** + * The list of data locations sampled and used for format/schema + * inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 1; + */ + private $sampled_data_locations; + /** + * The expected data format of the entity. + * + * Generated from protobuf field string expected_format = 2; + */ + protected $expected_format = ''; + /** + * The new unexpected data format within the entity. + * + * Generated from protobuf field string new_format = 3; + */ + protected $new_format = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations + * The list of data locations sampled and used for format/schema + * inference. + * @type string $expected_format + * The expected data format of the entity. + * @type string $new_format + * The new unexpected data format within the entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The list of data locations sampled and used for format/schema + * inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSampledDataLocations() + { + return $this->sampled_data_locations; + } + + /** + * The list of data locations sampled and used for format/schema + * inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSampledDataLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->sampled_data_locations = $arr; + + return $this; + } + + /** + * The expected data format of the entity. + * + * Generated from protobuf field string expected_format = 2; + * @return string + */ + public function getExpectedFormat() + { + return $this->expected_format; + } + + /** + * The expected data format of the entity. + * + * Generated from protobuf field string expected_format = 2; + * @param string $var + * @return $this + */ + public function setExpectedFormat($var) + { + GPBUtil::checkString($var, True); + $this->expected_format = $var; + + return $this; + } + + /** + * The new unexpected data format within the entity. + * + * Generated from protobuf field string new_format = 3; + * @return string + */ + public function getNewFormat() + { + return $this->new_format; + } + + /** + * The new unexpected data format within the entity. + * + * Generated from protobuf field string new_format = 3; + * @param string $var + * @return $this + */ + public function setNewFormat($var) + { + GPBUtil::checkString($var, True); + $this->new_format = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InvalidDataFormat::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataFormat::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php new file mode 100644 index 000000000000..bea138d90c89 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php @@ -0,0 +1,36 @@ +google.cloud.dataplex.v1.Action.InvalidDataOrganization + */ +class InvalidDataOrganization extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InvalidDataOrganization::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataOrganization::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php new file mode 100644 index 000000000000..754a46df3975 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php @@ -0,0 +1,70 @@ +google.cloud.dataplex.v1.Action.InvalidDataPartition + */ +class InvalidDataPartition extends \Google\Protobuf\Internal\Message +{ + /** + * The issue type of InvalidDataPartition. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; + */ + protected $expected_structure = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $expected_structure + * The issue type of InvalidDataPartition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The issue type of InvalidDataPartition. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; + * @return int + */ + public function getExpectedStructure() + { + return $this->expected_structure; + } + + /** + * The issue type of InvalidDataPartition. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; + * @param int $var + * @return $this + */ + public function setExpectedStructure($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition\PartitionStructure::class); + $this->expected_structure = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InvalidDataPartition::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataPartition::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php new file mode 100644 index 000000000000..89f807e2f256 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure + */ +class PartitionStructure +{ + /** + * PartitionStructure unspecified. + * + * Generated from protobuf enum PARTITION_STRUCTURE_UNSPECIFIED = 0; + */ + const PARTITION_STRUCTURE_UNSPECIFIED = 0; + /** + * Consistent hive-style partition definition (both raw and curated zone). + * + * Generated from protobuf enum CONSISTENT_KEYS = 1; + */ + const CONSISTENT_KEYS = 1; + /** + * Hive style partition definition (curated zone only). + * + * Generated from protobuf enum HIVE_STYLE_KEYS = 2; + */ + const HIVE_STYLE_KEYS = 2; + + private static $valueToName = [ + self::PARTITION_STRUCTURE_UNSPECIFIED => 'PARTITION_STRUCTURE_UNSPECIFIED', + self::CONSISTENT_KEYS => 'CONSISTENT_KEYS', + self::HIVE_STYLE_KEYS => 'HIVE_STYLE_KEYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PartitionStructure::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataPartition_PartitionStructure::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php new file mode 100644 index 000000000000..aa342f1f091c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php @@ -0,0 +1,36 @@ +google.cloud.dataplex.v1.Action.MissingData + */ +class MissingData extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MissingData::class, \Google\Cloud\Dataplex\V1\Action_MissingData::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php new file mode 100644 index 000000000000..a22aefa1573a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php @@ -0,0 +1,36 @@ +google.cloud.dataplex.v1.Action.MissingResource + */ +class MissingResource extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MissingResource::class, \Google\Cloud\Dataplex\V1\Action_MissingResource::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php new file mode 100644 index 000000000000..ed6bd9eeb793 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php @@ -0,0 +1,38 @@ +google.cloud.dataplex.v1.Action.UnauthorizedResource + */ +class UnauthorizedResource extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UnauthorizedResource::class, \Google\Cloud\Dataplex\V1\Action_UnauthorizedResource::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php new file mode 100644 index 000000000000..86dcebf8476a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php @@ -0,0 +1,574 @@ +google.cloud.dataplex.v1.Asset + */ +class Asset extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. System generated globally unique ID for the asset. This ID + * will be different if the asset is deleted and re-created with the same + * name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the asset 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 when the asset was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User defined labels for the asset. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of the asset. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Current state of the asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Specification of the resource that is referenced by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_spec = null; + /** + * Output only. Status of the resource referenced by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource_status = null; + /** + * Output only. Status of the security policy applied to resource referenced + * by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $security_status = null; + /** + * Optional. Specification of the discovery feature applied to data referenced + * by this asset. When this spec is left unset, the asset will use the spec + * set on the parent zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $discovery_spec = null; + /** + * Output only. Status of the discovery feature applied to data referenced by + * this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $discovery_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @type string $display_name + * Optional. User friendly display name. + * @type string $uid + * Output only. System generated globally unique ID for the asset. This ID + * will be different if the asset is deleted and re-created with the same + * name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the asset was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the asset was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User defined labels for the asset. + * @type string $description + * Optional. Description of the asset. + * @type int $state + * Output only. Current state of the asset. + * @type \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $resource_spec + * Required. Specification of the resource that is referenced by this asset. + * @type \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $resource_status + * Output only. Status of the resource referenced by this asset. + * @type \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $security_status + * Output only. Status of the security policy applied to resource referenced + * by this asset. + * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $discovery_spec + * Optional. Specification of the discovery feature applied to data referenced + * by this asset. When this spec is left unset, the asset will use the spec + * set on the parent zone. + * @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $discovery_status + * Output only. Status of the discovery feature applied to data referenced by + * this asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the asset, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the asset. This ID + * will be different if the asset is deleted and re-created with the same + * name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the asset. This ID + * will be different if the asset is deleted and re-created with the same + * name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the asset 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 when the asset 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 when the asset 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 when the asset 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; + } + + /** + * Optional. User defined labels for the asset. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User defined labels for the asset. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Description of the asset. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the asset. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Current state of the asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Specification of the resource that is referenced by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Asset\ResourceSpec|null + */ + public function getResourceSpec() + { + return $this->resource_spec; + } + + public function hasResourceSpec() + { + return isset($this->resource_spec); + } + + public function clearResourceSpec() + { + unset($this->resource_spec); + } + + /** + * Required. Specification of the resource that is referenced by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $var + * @return $this + */ + public function setResourceSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec::class); + $this->resource_spec = $var; + + return $this; + } + + /** + * Output only. Status of the resource referenced by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Asset\ResourceStatus|null + */ + public function getResourceStatus() + { + return $this->resource_status; + } + + public function hasResourceStatus() + { + return isset($this->resource_status); + } + + public function clearResourceStatus() + { + unset($this->resource_status); + } + + /** + * Output only. Status of the resource referenced by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $var + * @return $this + */ + public function setResourceStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceStatus::class); + $this->resource_status = $var; + + return $this; + } + + /** + * Output only. Status of the security policy applied to resource referenced + * by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Asset\SecurityStatus|null + */ + public function getSecurityStatus() + { + return $this->security_status; + } + + public function hasSecurityStatus() + { + return isset($this->security_status); + } + + public function clearSecurityStatus() + { + unset($this->security_status); + } + + /** + * Output only. Status of the security policy applied to resource referenced + * by this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $var + * @return $this + */ + public function setSecurityStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\SecurityStatus::class); + $this->security_status = $var; + + return $this; + } + + /** + * Optional. Specification of the discovery feature applied to data referenced + * by this asset. When this spec is left unset, the asset will use the spec + * set on the parent zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec|null + */ + public function getDiscoverySpec() + { + return $this->discovery_spec; + } + + public function hasDiscoverySpec() + { + return isset($this->discovery_spec); + } + + public function clearDiscoverySpec() + { + unset($this->discovery_spec); + } + + /** + * Optional. Specification of the discovery feature applied to data referenced + * by this asset. When this spec is left unset, the asset will use the spec + * set on the parent zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $var + * @return $this + */ + public function setDiscoverySpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec::class); + $this->discovery_spec = $var; + + return $this; + } + + /** + * Output only. Status of the discovery feature applied to data referenced by + * this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus|null + */ + public function getDiscoveryStatus() + { + return $this->discovery_status; + } + + public function hasDiscoveryStatus() + { + return isset($this->discovery_status); + } + + public function clearDiscoveryStatus() + { + unset($this->discovery_status); + } + + /** + * Output only. Status of the discovery feature applied to data referenced by + * this asset. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $var + * @return $this + */ + public function setDiscoveryStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus::class); + $this->discovery_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php new file mode 100644 index 000000000000..6fa21b6e43c2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php @@ -0,0 +1,317 @@ +google.cloud.dataplex.v1.Asset.DiscoverySpec + */ +class DiscoverySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether discovery is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + /** + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * + * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $include_patterns; + /** + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * + * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $exclude_patterns; + /** + * Optional. Configuration for CSV data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $csv_options = null; + /** + * Optional. Configuration for Json data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $json_options = null; + protected $trigger; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Optional. Whether discovery is enabled. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_patterns + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_patterns + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions $csv_options + * Optional. Configuration for CSV data. + * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions $json_options + * Optional. Configuration for Json data. + * @type string $schedule + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running discovery periodically. Successive discovery runs must be + * scheduled at least 60 minutes apart. The default value is to run + * discovery every 60 minutes. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + * * * * *`, or `TZ=America/New_York 1 * * * *`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether discovery is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. Whether discovery is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * + * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludePatterns() + { + return $this->include_patterns; + } + + /** + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * + * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludePatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_patterns = $arr; + + return $this; + } + + /** + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * + * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludePatterns() + { + return $this->exclude_patterns; + } + + /** + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * + * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludePatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclude_patterns = $arr; + + return $this; + } + + /** + * Optional. Configuration for CSV data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions|null + */ + public function getCsvOptions() + { + return $this->csv_options; + } + + public function hasCsvOptions() + { + return isset($this->csv_options); + } + + public function clearCsvOptions() + { + unset($this->csv_options); + } + + /** + * Optional. Configuration for CSV data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions $var + * @return $this + */ + public function setCsvOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions::class); + $this->csv_options = $var; + + return $this; + } + + /** + * Optional. Configuration for Json data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions|null + */ + public function getJsonOptions() + { + return $this->json_options; + } + + public function hasJsonOptions() + { + return isset($this->json_options); + } + + public function clearJsonOptions() + { + unset($this->json_options); + } + + /** + * Optional. Configuration for Json data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions $var + * @return $this + */ + public function setJsonOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions::class); + $this->json_options = $var; + + return $this; + } + + /** + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running discovery periodically. Successive discovery runs must be + * scheduled at least 60 minutes apart. The default value is to run + * discovery every 60 minutes. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + * * * * *`, or `TZ=America/New_York 1 * * * *`. + * + * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSchedule() + { + return $this->readOneof(10); + } + + public function hasSchedule() + { + return $this->hasOneof(10); + } + + /** + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running discovery periodically. Successive discovery runs must be + * scheduled at least 60 minutes apart. The default value is to run + * discovery every 60 minutes. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + * * * * *`, or `TZ=America/New_York 1 * * * *`. + * + * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getTrigger() + { + return $this->whichOneof("trigger"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiscoverySpec::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php new file mode 100644 index 000000000000..3380aa019da7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php @@ -0,0 +1,184 @@ +google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + */ +class CsvOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * + * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header_rows = 0; + /** + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * + * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delimiter = ''; + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encoding = ''; + /** + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * + * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_type_inference = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $header_rows + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * @type string $delimiter + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * @type string $encoding + * Optional. The character encoding of the data. The default is UTF-8. + * @type bool $disable_type_inference + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * + * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getHeaderRows() + { + return $this->header_rows; + } + + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * + * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setHeaderRows($var) + { + GPBUtil::checkInt32($var); + $this->header_rows = $var; + + return $this; + } + + /** + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * + * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * + * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDelimiter($var) + { + GPBUtil::checkString($var, True); + $this->delimiter = $var; + + return $this; + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * + * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisableTypeInference() + { + return $this->disable_type_inference; + } + + /** + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * + * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisableTypeInference($var) + { + GPBUtil::checkBool($var); + $this->disable_type_inference = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec_CsvOptions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php new file mode 100644 index 000000000000..ac4b34455c86 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php @@ -0,0 +1,112 @@ +google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + */ +class JsonOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encoding = ''; + /** + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * + * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_type_inference = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $encoding + * Optional. The character encoding of the data. The default is UTF-8. + * @type bool $disable_type_inference + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * + * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisableTypeInference() + { + return $this->disable_type_inference; + } + + /** + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * + * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisableTypeInference($var) + { + GPBUtil::checkBool($var); + $this->disable_type_inference = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec_JsonOptions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php new file mode 100644 index 000000000000..fb128a346880 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php @@ -0,0 +1,280 @@ +google.cloud.dataplex.v1.Asset.DiscoveryStatus + */ +class DiscoveryStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The current status of the discovery feature. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; + */ + protected $state = 0; + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * The start time of the last discovery run. + * + * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; + */ + protected $last_run_time = null; + /** + * Data Stats of the asset reported by discovery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; + */ + protected $stats = null; + /** + * The duration of the last discovery run. + * + * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; + */ + protected $last_run_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current status of the discovery feature. + * @type string $message + * Additional information about the current state. + * @type \Google\Protobuf\Timestamp $update_time + * Last update time of the status. + * @type \Google\Protobuf\Timestamp $last_run_time + * The start time of the last discovery run. + * @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $stats + * Data Stats of the asset reported by discovery. + * @type \Google\Protobuf\Duration $last_run_duration + * The duration of the last discovery run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The current status of the discovery feature. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current status of the discovery feature. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @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); + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The start time of the last discovery run. + * + * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastRunTime() + { + return $this->last_run_time; + } + + public function hasLastRunTime() + { + return isset($this->last_run_time); + } + + public function clearLastRunTime() + { + unset($this->last_run_time); + } + + /** + * The start time of the last discovery run. + * + * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_run_time = $var; + + return $this; + } + + /** + * Data Stats of the asset reported by discovery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; + * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Data Stats of the asset reported by discovery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; + * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats::class); + $this->stats = $var; + + return $this; + } + + /** + * The duration of the last discovery run. + * + * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getLastRunDuration() + { + return $this->last_run_duration; + } + + public function hasLastRunDuration() + { + return isset($this->last_run_duration); + } + + public function clearLastRunDuration() + { + unset($this->last_run_duration); + } + + /** + * The duration of the last discovery run. + * + * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLastRunDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->last_run_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiscoveryStatus::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php new file mode 100644 index 000000000000..25093e6007a0 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php @@ -0,0 +1,79 @@ +google.cloud.dataplex.v1.Asset.DiscoveryStatus.State + */ +class State +{ + /** + * State is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Discovery for the asset is scheduled. + * + * Generated from protobuf enum SCHEDULED = 1; + */ + const SCHEDULED = 1; + /** + * Discovery for the asset is running. + * + * Generated from protobuf enum IN_PROGRESS = 2; + */ + const IN_PROGRESS = 2; + /** + * Discovery for the asset is currently paused (e.g. due to a lack + * of available resources). It will be automatically resumed. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * Discovery for the asset is disabled. + * + * Generated from protobuf enum DISABLED = 5; + */ + const DISABLED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SCHEDULED => 'SCHEDULED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::PAUSED => 'PAUSED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php new file mode 100644 index 000000000000..0b04d36fd07b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php @@ -0,0 +1,172 @@ +google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + */ +class Stats extends \Google\Protobuf\Internal\Message +{ + /** + * The count of data items within the referenced resource. + * + * Generated from protobuf field int64 data_items = 1; + */ + protected $data_items = 0; + /** + * The number of stored data bytes within the referenced resource. + * + * Generated from protobuf field int64 data_size = 2; + */ + protected $data_size = 0; + /** + * The count of table entities within the referenced resource. + * + * Generated from protobuf field int64 tables = 3; + */ + protected $tables = 0; + /** + * The count of fileset entities within the referenced resource. + * + * Generated from protobuf field int64 filesets = 4; + */ + protected $filesets = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $data_items + * The count of data items within the referenced resource. + * @type int|string $data_size + * The number of stored data bytes within the referenced resource. + * @type int|string $tables + * The count of table entities within the referenced resource. + * @type int|string $filesets + * The count of fileset entities within the referenced resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The count of data items within the referenced resource. + * + * Generated from protobuf field int64 data_items = 1; + * @return int|string + */ + public function getDataItems() + { + return $this->data_items; + } + + /** + * The count of data items within the referenced resource. + * + * Generated from protobuf field int64 data_items = 1; + * @param int|string $var + * @return $this + */ + public function setDataItems($var) + { + GPBUtil::checkInt64($var); + $this->data_items = $var; + + return $this; + } + + /** + * The number of stored data bytes within the referenced resource. + * + * Generated from protobuf field int64 data_size = 2; + * @return int|string + */ + public function getDataSize() + { + return $this->data_size; + } + + /** + * The number of stored data bytes within the referenced resource. + * + * Generated from protobuf field int64 data_size = 2; + * @param int|string $var + * @return $this + */ + public function setDataSize($var) + { + GPBUtil::checkInt64($var); + $this->data_size = $var; + + return $this; + } + + /** + * The count of table entities within the referenced resource. + * + * Generated from protobuf field int64 tables = 3; + * @return int|string + */ + public function getTables() + { + return $this->tables; + } + + /** + * The count of table entities within the referenced resource. + * + * Generated from protobuf field int64 tables = 3; + * @param int|string $var + * @return $this + */ + public function setTables($var) + { + GPBUtil::checkInt64($var); + $this->tables = $var; + + return $this; + } + + /** + * The count of fileset entities within the referenced resource. + * + * Generated from protobuf field int64 filesets = 4; + * @return int|string + */ + public function getFilesets() + { + return $this->filesets; + } + + /** + * The count of fileset entities within the referenced resource. + * + * Generated from protobuf field int64 filesets = 4; + * @param int|string $var + * @return $this + */ + public function setFilesets($var) + { + GPBUtil::checkInt64($var); + $this->filesets = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Stats::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus_Stats::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php new file mode 100644 index 000000000000..154209d8aae2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php @@ -0,0 +1,154 @@ +google.cloud.dataplex.v1.Asset.ResourceSpec + */ +class ResourceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Relative name of the cloud resource that contains the data + * that is being managed within a lake. For example: + * `projects/{project_number}/buckets/{bucket_id}` + * `projects/{project_number}/datasets/{dataset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Required. Immutable. Type of resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Optional. Determines how read permissions are handled for each asset and + * their associated tables. Only available to storage buckets assets. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_access_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Relative name of the cloud resource that contains the data + * that is being managed within a lake. For example: + * `projects/{project_number}/buckets/{bucket_id}` + * `projects/{project_number}/datasets/{dataset_id}` + * @type int $type + * Required. Immutable. Type of resource. + * @type int $read_access_mode + * Optional. Determines how read permissions are handled for each asset and + * their associated tables. Only available to storage buckets assets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Relative name of the cloud resource that contains the data + * that is being managed within a lake. For example: + * `projects/{project_number}/buckets/{bucket_id}` + * `projects/{project_number}/datasets/{dataset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Relative name of the cloud resource that contains the data + * that is being managed within a lake. For example: + * `projects/{project_number}/buckets/{bucket_id}` + * `projects/{project_number}/datasets/{dataset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. Type of resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Immutable. Type of resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. Determines how read permissions are handled for each asset and + * their associated tables. Only available to storage buckets assets. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getReadAccessMode() + { + return $this->read_access_mode; + } + + /** + * Optional. Determines how read permissions are handled for each asset and + * their associated tables. Only available to storage buckets assets. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setReadAccessMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec\AccessMode::class); + $this->read_access_mode = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceSpec::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php new file mode 100644 index 000000000000..5eefd16cbb83 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php @@ -0,0 +1,65 @@ +google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode + */ +class AccessMode +{ + /** + * Access mode unspecified. + * + * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; + */ + const ACCESS_MODE_UNSPECIFIED = 0; + /** + * Default. Data is accessed directly using storage APIs. + * + * Generated from protobuf enum DIRECT = 1; + */ + const DIRECT = 1; + /** + * Data is accessed through a managed interface using BigQuery APIs. + * + * Generated from protobuf enum MANAGED = 2; + */ + const MANAGED = 2; + + private static $valueToName = [ + self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_MODE_UNSPECIFIED', + self::DIRECT => 'DIRECT', + self::MANAGED => 'MANAGED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccessMode::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec_AccessMode::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php new file mode 100644 index 000000000000..b0a24b084e6c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.Asset.ResourceSpec.Type + */ +class Type +{ + /** + * Type not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Cloud Storage bucket. + * + * Generated from protobuf enum STORAGE_BUCKET = 1; + */ + const STORAGE_BUCKET = 1; + /** + * BigQuery dataset. + * + * Generated from protobuf enum BIGQUERY_DATASET = 2; + */ + const BIGQUERY_DATASET = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STORAGE_BUCKET => 'STORAGE_BUCKET', + self::BIGQUERY_DATASET => 'BIGQUERY_DATASET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec_Type::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php new file mode 100644 index 000000000000..4a82e4f8b674 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php @@ -0,0 +1,182 @@ +google.cloud.dataplex.v1.Asset.ResourceStatus + */ +class ResourceStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the managed resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; + */ + protected $state = 0; + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * Output only. Service account associated with the BigQuery Connection. + * + * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $managed_access_identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the managed resource. + * @type string $message + * Additional information about the current state. + * @type \Google\Protobuf\Timestamp $update_time + * Last update time of the status. + * @type string $managed_access_identity + * Output only. Service account associated with the BigQuery Connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the managed resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the managed resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @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); + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @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. Service account associated with the BigQuery Connection. + * + * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getManagedAccessIdentity() + { + return $this->managed_access_identity; + } + + /** + * Output only. Service account associated with the BigQuery Connection. + * + * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setManagedAccessIdentity($var) + { + GPBUtil::checkString($var, True); + $this->managed_access_identity = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceStatus::class, \Google\Cloud\Dataplex\V1\Asset_ResourceStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php new file mode 100644 index 000000000000..a3d2646b2682 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.Asset.ResourceStatus.State + */ +class State +{ + /** + * State unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Resource does not have any errors. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Resource has errors. + * + * Generated from protobuf enum ERROR = 2; + */ + const ERROR = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_ResourceStatus_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php new file mode 100644 index 000000000000..0551695cf24e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php @@ -0,0 +1,153 @@ +google.cloud.dataplex.v1.Asset.SecurityStatus + */ +class SecurityStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the security policy applied to the attached + * resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; + */ + protected $state = 0; + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the security policy applied to the attached + * resource. + * @type string $message + * Additional information about the current state. + * @type \Google\Protobuf\Timestamp $update_time + * Last update time of the status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the security policy applied to the attached + * resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the security policy applied to the attached + * resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\SecurityStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the current state. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @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); + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecurityStatus::class, \Google\Cloud\Dataplex\V1\Asset_SecurityStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php new file mode 100644 index 000000000000..306952bcbe0b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php @@ -0,0 +1,73 @@ +google.cloud.dataplex.v1.Asset.SecurityStatus.State + */ +class State +{ + /** + * State unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Security policy has been successfully applied to the attached resource. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Security policy is in the process of being applied to the attached + * resource. + * + * Generated from protobuf enum APPLYING = 2; + */ + const APPLYING = 2; + /** + * Security policy could not be applied to the attached resource due to + * errors. + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::APPLYING => 'APPLYING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_SecurityStatus_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php new file mode 100644 index 000000000000..0ac2ee4ec6d3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php @@ -0,0 +1,149 @@ +google.cloud.dataplex.v1.AssetStatus + */ +class AssetStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + */ + protected $update_time = null; + /** + * Number of active assets. + * + * Generated from protobuf field int32 active_assets = 2; + */ + protected $active_assets = 0; + /** + * Number of assets that are in process of updating the security policy on + * attached resources. + * + * Generated from protobuf field int32 security_policy_applying_assets = 3; + */ + protected $security_policy_applying_assets = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * Last update time of the status. + * @type int $active_assets + * Number of active assets. + * @type int $security_policy_applying_assets + * Number of assets that are in process of updating the security policy on + * attached resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Number of active assets. + * + * Generated from protobuf field int32 active_assets = 2; + * @return int + */ + public function getActiveAssets() + { + return $this->active_assets; + } + + /** + * Number of active assets. + * + * Generated from protobuf field int32 active_assets = 2; + * @param int $var + * @return $this + */ + public function setActiveAssets($var) + { + GPBUtil::checkInt32($var); + $this->active_assets = $var; + + return $this; + } + + /** + * Number of assets that are in process of updating the security policy on + * attached resources. + * + * Generated from protobuf field int32 security_policy_applying_assets = 3; + * @return int + */ + public function getSecurityPolicyApplyingAssets() + { + return $this->security_policy_applying_assets; + } + + /** + * Number of assets that are in process of updating the security policy on + * attached resources. + * + * Generated from protobuf field int32 security_policy_applying_assets = 3; + * @param int $var + * @return $this + */ + public function setSecurityPolicyApplyingAssets($var) + { + GPBUtil::checkInt32($var); + $this->security_policy_applying_assets = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php new file mode 100644 index 000000000000..39eaf72e4716 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.CancelJobRequest + */ +class CancelJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + * + * 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 job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. Please see + * {@see DataplexServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\CancelJobRequest + * + * @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 job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + * + * 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 job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php new file mode 100644 index 000000000000..bdf804b99374 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php @@ -0,0 +1,428 @@ +google.cloud.dataplex.v1.Content + */ +class Content extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the content. This ID + * will be different if the content is deleted and re-created with the same + * name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The path for the Content file, represented as directory + * structure. Unique within a lake. Limited to alphanumerics, hyphens, + * underscores, dots and slashes. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $path = ''; + /** + * Output only. Content creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the content was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User defined labels for the content. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of the content. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + protected $data; + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @type string $uid + * Output only. System generated globally unique ID for the content. This ID + * will be different if the content is deleted and re-created with the same + * name. + * @type string $path + * Required. The path for the Content file, represented as directory + * structure. Unique within a lake. Limited to alphanumerics, hyphens, + * underscores, dots and slashes. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Content creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the content was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User defined labels for the content. + * @type string $description + * Optional. Description of the content. + * @type string $data_text + * Required. Content data in string format. + * @type \Google\Cloud\Dataplex\V1\Content\SqlScript $sql_script + * Sql Script related configurations. + * @type \Google\Cloud\Dataplex\V1\Content\Notebook $notebook + * Notebook related configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the content. This ID + * will be different if the content is deleted and re-created with the same + * name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the content. This ID + * will be different if the content is deleted and re-created with the same + * name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Required. The path for the Content file, represented as directory + * structure. Unique within a lake. Limited to alphanumerics, hyphens, + * underscores, dots and slashes. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Required. The path for the Content file, represented as directory + * structure. Unique within a lake. Limited to alphanumerics, hyphens, + * underscores, dots and slashes. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Output only. Content creation 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. Content creation 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. The time when the content 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 when the content 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; + } + + /** + * Optional. User defined labels for the content. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User defined labels for the content. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Description of the content. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the content. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Content data in string format. + * + * Generated from protobuf field string data_text = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataText() + { + return $this->readOneof(9); + } + + public function hasDataText() + { + return $this->hasOneof(9); + } + + /** + * Required. Content data in string format. + * + * Generated from protobuf field string data_text = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Sql Script related configurations. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript sql_script = 100; + * @return \Google\Cloud\Dataplex\V1\Content\SqlScript|null + */ + public function getSqlScript() + { + return $this->readOneof(100); + } + + public function hasSqlScript() + { + return $this->hasOneof(100); + } + + /** + * Sql Script related configurations. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript sql_script = 100; + * @param \Google\Cloud\Dataplex\V1\Content\SqlScript $var + * @return $this + */ + public function setSqlScript($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content\SqlScript::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Notebook related configurations. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook notebook = 101; + * @return \Google\Cloud\Dataplex\V1\Content\Notebook|null + */ + public function getNotebook() + { + return $this->readOneof(101); + } + + public function hasNotebook() + { + return $this->hasOneof(101); + } + + /** + * Notebook related configurations. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook notebook = 101; + * @param \Google\Cloud\Dataplex\V1\Content\Notebook $var + * @return $this + */ + public function setNotebook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content\Notebook::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php new file mode 100644 index 000000000000..cca8345c3c8f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php @@ -0,0 +1,70 @@ +google.cloud.dataplex.v1.Content.Notebook + */ +class Notebook extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Kernel Type of the notebook. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kernel_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $kernel_type + * Required. Kernel Type of the notebook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Required. Kernel Type of the notebook. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getKernelType() + { + return $this->kernel_type; + } + + /** + * Required. Kernel Type of the notebook. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setKernelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Content\Notebook\KernelType::class); + $this->kernel_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Notebook::class, \Google\Cloud\Dataplex\V1\Content_Notebook::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php new file mode 100644 index 000000000000..a33a77e1cf4e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php @@ -0,0 +1,57 @@ +google.cloud.dataplex.v1.Content.Notebook.KernelType + */ +class KernelType +{ + /** + * Kernel Type unspecified. + * + * Generated from protobuf enum KERNEL_TYPE_UNSPECIFIED = 0; + */ + const KERNEL_TYPE_UNSPECIFIED = 0; + /** + * Python 3 Kernel. + * + * Generated from protobuf enum PYTHON3 = 1; + */ + const PYTHON3 = 1; + + private static $valueToName = [ + self::KERNEL_TYPE_UNSPECIFIED => 'KERNEL_TYPE_UNSPECIFIED', + self::PYTHON3 => 'PYTHON3', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KernelType::class, \Google\Cloud\Dataplex\V1\Content_Notebook_KernelType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php new file mode 100644 index 000000000000..89b5cc41b9be --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php @@ -0,0 +1,70 @@ +google.cloud.dataplex.v1.Content.SqlScript + */ +class SqlScript extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Query Engine to be used for the Sql Query. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $engine = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $engine + * Required. Query Engine to be used for the Sql Query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Required. Query Engine to be used for the Sql Query. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Required. Query Engine to be used for the Sql Query. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEngine($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Content\SqlScript\QueryEngine::class); + $this->engine = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlScript::class, \Google\Cloud\Dataplex\V1\Content_SqlScript::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php new file mode 100644 index 000000000000..fbc494c2393d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php @@ -0,0 +1,57 @@ +google.cloud.dataplex.v1.Content.SqlScript.QueryEngine + */ +class QueryEngine +{ + /** + * Value was unspecified. + * + * Generated from protobuf enum QUERY_ENGINE_UNSPECIFIED = 0; + */ + const QUERY_ENGINE_UNSPECIFIED = 0; + /** + * Spark SQL Query. + * + * Generated from protobuf enum SPARK = 2; + */ + const SPARK = 2; + + private static $valueToName = [ + self::QUERY_ENGINE_UNSPECIFIED => 'QUERY_ENGINE_UNSPECIFIED', + self::SPARK => 'SPARK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QueryEngine::class, \Google\Cloud\Dataplex\V1\Content_SqlScript_QueryEngine::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php new file mode 100644 index 000000000000..7738558c8804 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php @@ -0,0 +1,241 @@ +google.cloud.dataplex.v1.CreateAssetRequest + */ +class CreateAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * + * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset_id = ''; + /** + * Required. Asset resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see + * {@see DataplexServiceClient::zoneName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Asset $asset Required. Asset resource. + * @param string $assetId Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * + * @return \Google\Cloud\Dataplex\V1\CreateAssetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Asset $asset, string $assetId): self + { + return (new self()) + ->setParent($parent) + ->setAsset($asset) + ->setAssetId($assetId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @type string $asset_id + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * @type \Google\Cloud\Dataplex\V1\Asset $asset + * Required. Asset resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * + * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAssetId() + { + return $this->asset_id; + } + + /** + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * + * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + + /** + * Required. Asset resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Required. Asset resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php new file mode 100644 index 000000000000..b9f40119a99d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php @@ -0,0 +1,170 @@ +google.cloud.dataplex.v1.CreateContentRequest + */ +class CreateContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Content resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $content = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * Please see {@see ContentServiceClient::lakeName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Content $content Required. Content resource. + * + * @return \Google\Cloud\Dataplex\V1\CreateContentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Content $content): self + { + return (new self()) + ->setParent($parent) + ->setContent($content); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @type \Google\Cloud\Dataplex\V1\Content $content + * Required. Content resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * + * 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 name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * + * 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. Content resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Content|null + */ + public function getContent() + { + return $this->content; + } + + public function hasContent() + { + return isset($this->content); + } + + public function clearContent() + { + unset($this->content); + } + + /** + * Required. Content resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Content $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content::class); + $this->content = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php new file mode 100644 index 000000000000..02408fcac3c9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php @@ -0,0 +1,231 @@ +google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + */ +class CreateDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + * + * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_attribute_binding_id = ''; + /** + * Required. DataAttributeBinding resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_attribute_binding = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * Please see {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding Required. DataAttributeBinding resource. + * @param string $dataAttributeBindingId Required. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + * + * @return \Google\Cloud\Dataplex\V1\CreateDataAttributeBindingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding, string $dataAttributeBindingId): self + { + return (new self()) + ->setParent($parent) + ->setDataAttributeBinding($dataAttributeBinding) + ->setDataAttributeBindingId($dataAttributeBindingId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * @type string $data_attribute_binding_id + * Required. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + * @type \Google\Cloud\Dataplex\V1\DataAttributeBinding $data_attribute_binding + * Required. DataAttributeBinding resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * + * 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 name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * + * 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. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + * + * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataAttributeBindingId() + { + return $this->data_attribute_binding_id; + } + + /** + * Required. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + * + * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataAttributeBindingId($var) + { + GPBUtil::checkString($var, True); + $this->data_attribute_binding_id = $var; + + return $this; + } + + /** + * Required. DataAttributeBinding resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding|null + */ + public function getDataAttributeBinding() + { + return $this->data_attribute_binding; + } + + public function hasDataAttributeBinding() + { + return isset($this->data_attribute_binding); + } + + public function clearDataAttributeBinding() + { + unset($this->data_attribute_binding); + } + + /** + * Required. DataAttributeBinding resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $var + * @return $this + */ + public function setDataAttributeBinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); + $this->data_attribute_binding = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php new file mode 100644 index 000000000000..62977dd678c9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php @@ -0,0 +1,231 @@ +google.cloud.dataplex.v1.CreateDataAttributeRequest + */ +class CreateDataAttributeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + * + * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_attribute_id = ''; + /** + * Required. DataAttribute resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_attribute = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute Required. DataAttribute resource. + * @param string $dataAttributeId Required. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + * + * @return \Google\Cloud\Dataplex\V1\CreateDataAttributeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute, string $dataAttributeId): self + { + return (new self()) + ->setParent($parent) + ->setDataAttribute($dataAttribute) + ->setDataAttributeId($dataAttributeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @type string $data_attribute_id + * Required. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + * @type \Google\Cloud\Dataplex\V1\DataAttribute $data_attribute + * Required. DataAttribute resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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 name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + * + * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataAttributeId() + { + return $this->data_attribute_id; + } + + /** + * Required. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + * + * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataAttributeId($var) + { + GPBUtil::checkString($var, True); + $this->data_attribute_id = $var; + + return $this; + } + + /** + * Required. DataAttribute resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataAttribute|null + */ + public function getDataAttribute() + { + return $this->data_attribute; + } + + public function hasDataAttribute() + { + return isset($this->data_attribute); + } + + public function clearDataAttribute() + { + unset($this->data_attribute); + } + + /** + * Required. DataAttribute resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataAttribute $var + * @return $this + */ + public function setDataAttribute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttribute::class); + $this->data_attribute = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php new file mode 100644 index 000000000000..ff546cc358c2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php @@ -0,0 +1,242 @@ +google.cloud.dataplex.v1.CreateDataScanRequest + */ +class CreateDataScanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. DataScan resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_scan = null; + /** + * Required. DataScan identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_scan_id = ''; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. Please see + * {@see DataScanServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\DataScan $dataScan Required. DataScan resource. + * @param string $dataScanId Required. DataScan identifier. + * + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * @return \Google\Cloud\Dataplex\V1\CreateDataScanRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataScan $dataScan, string $dataScanId): self + { + return (new self()) + ->setParent($parent) + ->setDataScan($dataScan) + ->setDataScanId($dataScanId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @type \Google\Cloud\Dataplex\V1\DataScan $data_scan + * Required. DataScan resource. + * @type string $data_scan_id + * Required. DataScan identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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 name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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. DataScan resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataScan|null + */ + public function getDataScan() + { + return $this->data_scan; + } + + public function hasDataScan() + { + return isset($this->data_scan); + } + + public function clearDataScan() + { + unset($this->data_scan); + } + + /** + * Required. DataScan resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataScan $var + * @return $this + */ + public function setDataScan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan::class); + $this->data_scan = $var; + + return $this; + } + + /** + * Required. DataScan identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataScanId() + { + return $this->data_scan_id; + } + + /** + * Required. DataScan identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataScanId($var) + { + GPBUtil::checkString($var, True); + $this->data_scan_id = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php new file mode 100644 index 000000000000..6576b106053c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php @@ -0,0 +1,236 @@ +google.cloud.dataplex.v1.CreateDataTaxonomyRequest + */ +class CreateDataTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + * + * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_taxonomy_id = ''; + /** + * Required. DataTaxonomy resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_taxonomy = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. Please see + * {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy Required. DataTaxonomy resource. + * @param string $dataTaxonomyId Required. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + * + * @return \Google\Cloud\Dataplex\V1\CreateDataTaxonomyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy, string $dataTaxonomyId): self + { + return (new self()) + ->setParent($parent) + ->setDataTaxonomy($dataTaxonomy) + ->setDataTaxonomyId($dataTaxonomyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @type string $data_taxonomy_id + * Required. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + * @type \Google\Cloud\Dataplex\V1\DataTaxonomy $data_taxonomy + * Required. DataTaxonomy resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * 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 name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * 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. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + * + * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataTaxonomyId() + { + return $this->data_taxonomy_id; + } + + /** + * Required. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + * + * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataTaxonomyId($var) + { + GPBUtil::checkString($var, True); + $this->data_taxonomy_id = $var; + + return $this; + } + + /** + * Required. DataTaxonomy resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataTaxonomy|null + */ + public function getDataTaxonomy() + { + return $this->data_taxonomy; + } + + public function hasDataTaxonomy() + { + return isset($this->data_taxonomy); + } + + public function clearDataTaxonomy() + { + unset($this->data_taxonomy); + } + + /** + * Required. DataTaxonomy resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $var + * @return $this + */ + public function setDataTaxonomy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); + $this->data_taxonomy = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php new file mode 100644 index 000000000000..a20402edd79a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php @@ -0,0 +1,170 @@ +google.cloud.dataplex.v1.CreateEntityRequest + */ +class CreateEntityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see + * {@see MetadataServiceClient::zoneName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Entity $entity Required. Entity resource. + * + * @return \Google\Cloud\Dataplex\V1\CreateEntityRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Entity $entity): self + { + return (new self()) + ->setParent($parent) + ->setEntity($entity); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @type \Google\Cloud\Dataplex\V1\Entity $entity + * Required. Entity resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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. Entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Required. Entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity::class); + $this->entity = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php new file mode 100644 index 000000000000..9c62503fb5e7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php @@ -0,0 +1,231 @@ +google.cloud.dataplex.v1.CreateEnvironmentRequest + */ +class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * + * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment_id = ''; + /** + * Required. Environment resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Environment $environment Required. Environment resource. + * @param string $environmentId Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * + * @return \Google\Cloud\Dataplex\V1\CreateEnvironmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Environment $environment, string $environmentId): self + { + return (new self()) + ->setParent($parent) + ->setEnvironment($environment) + ->setEnvironmentId($environmentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @type string $environment_id + * Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * @type \Google\Cloud\Dataplex\V1\Environment $environment + * Required. Environment resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * + * 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. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * + * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEnvironmentId() + { + return $this->environment_id; + } + + /** + * Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * + * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEnvironmentId($var) + { + GPBUtil::checkString($var, True); + $this->environment_id = $var; + + return $this; + } + + /** + * Required. Environment resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Required. Environment resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php new file mode 100644 index 000000000000..0a4f55da6883 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php @@ -0,0 +1,246 @@ +google.cloud.dataplex.v1.CreateLakeRequest + */ +class CreateLakeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lake_id = ''; + /** + * Required. Lake resource + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lake = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. Please see + * {@see DataplexServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Lake $lake Required. Lake resource + * @param string $lakeId Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * @return \Google\Cloud\Dataplex\V1\CreateLakeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Lake $lake, string $lakeId): self + { + return (new self()) + ->setParent($parent) + ->setLake($lake) + ->setLakeId($lakeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @type string $lake_id + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @type \Google\Cloud\Dataplex\V1\Lake $lake + * Required. Lake resource + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * 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 name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * 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. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLakeId() + { + return $this->lake_id; + } + + /** + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * + * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLakeId($var) + { + GPBUtil::checkString($var, True); + $this->lake_id = $var; + + return $this; + } + + /** + * Required. Lake resource + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Lake|null + */ + public function getLake() + { + return $this->lake; + } + + public function hasLake() + { + return isset($this->lake); + } + + public function clearLake() + { + unset($this->lake); + } + + /** + * Required. Lake resource + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Lake $var + * @return $this + */ + public function setLake($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake::class); + $this->lake = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php new file mode 100644 index 000000000000..103aa8f21d19 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php @@ -0,0 +1,170 @@ +google.cloud.dataplex.v1.CreatePartitionRequest + */ +class CreatePartitionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Partition resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $partition = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see + * {@see MetadataServiceClient::entityName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Partition $partition Required. Partition resource. + * + * @return \Google\Cloud\Dataplex\V1\CreatePartitionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Partition $partition): self + { + return (new self()) + ->setParent($parent) + ->setPartition($partition); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @type \Google\Cloud\Dataplex\V1\Partition $partition + * Required. Partition resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * 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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * 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. Partition resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Partition|null + */ + public function getPartition() + { + return $this->partition; + } + + public function hasPartition() + { + return isset($this->partition); + } + + public function clearPartition() + { + unset($this->partition); + } + + /** + * Required. Partition resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Partition $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Partition::class); + $this->partition = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php new file mode 100644 index 000000000000..5fb51f83898d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php @@ -0,0 +1,206 @@ +google.cloud.dataplex.v1.CreateTaskRequest + */ +class CreateTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Task identifier. + * + * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task_id = ''; + /** + * Required. Task resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Task $task Required. Task resource. + * @param string $taskId Required. Task identifier. + * + * @return \Google\Cloud\Dataplex\V1\CreateTaskRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Task $task, string $taskId): self + { + return (new self()) + ->setParent($parent) + ->setTask($task) + ->setTaskId($taskId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @type string $task_id + * Required. Task identifier. + * @type \Google\Cloud\Dataplex\V1\Task $task + * Required. Task resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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. Task identifier. + * + * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTaskId() + { + return $this->task_id; + } + + /** + * Required. Task identifier. + * + * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTaskId($var) + { + GPBUtil::checkString($var, True); + $this->task_id = $var; + + return $this; + } + + /** + * Required. Task resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Task|null + */ + public function getTask() + { + return $this->task; + } + + public function hasTask() + { + return isset($this->task); + } + + public function clearTask() + { + unset($this->task); + } + + /** + * Required. Task resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Task $var + * @return $this + */ + public function setTask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task::class); + $this->task = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php new file mode 100644 index 000000000000..6ef76089afec --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php @@ -0,0 +1,246 @@ +google.cloud.dataplex.v1.CreateZoneRequest + */ +class CreateZoneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * + * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $zone_id = ''; + /** + * Required. Zone resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $zone = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * @param \Google\Cloud\Dataplex\V1\Zone $zone Required. Zone resource. + * @param string $zoneId Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * + * @return \Google\Cloud\Dataplex\V1\CreateZoneRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataplex\V1\Zone $zone, string $zoneId): self + { + return (new self()) + ->setParent($parent) + ->setZone($zone) + ->setZoneId($zoneId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @type string $zone_id + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * @type \Google\Cloud\Dataplex\V1\Zone $zone + * Required. Zone resource. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * + * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZoneId() + { + return $this->zone_id; + } + + /** + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * + * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZoneId($var) + { + GPBUtil::checkString($var, True); + $this->zone_id = $var; + + return $this; + } + + /** + * Required. Zone resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Zone|null + */ + public function getZone() + { + return $this->zone; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * Required. Zone resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Zone $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone::class); + $this->zone = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php new file mode 100644 index 000000000000..7914ac8aa22a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php @@ -0,0 +1,83 @@ +google.cloud.dataplex.v1.DataAccessSpec + */ +class DataAccessSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on data + * stored within resources. + * + * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $readers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $readers + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on data + * stored within resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Security::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on data + * stored within resources. + * + * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReaders() + { + return $this->readers; + } + + /** + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on data + * stored within resources. + * + * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->readers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php new file mode 100644 index 000000000000..6e3eca726f5e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php @@ -0,0 +1,530 @@ +google.cloud.dataplex.v1.DataAttribute + */ +class DataAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the dataAttribute, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the DataAttribute. + * This ID will be different if the DataAttribute is deleted and re-created + * with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the DataAttribute was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the DataAttribute was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Description of the DataAttribute. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. User-defined labels for the DataAttribute. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The ID of the parent DataAttribute resource, should belong to the + * same data taxonomy. Circular dependency in parent chain is not valid. + * Maximum depth of the hierarchy allowed is 4. + * [a -> b -> c -> d -> e, depth = 4] + * + * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $parent_id = ''; + /** + * Output only. The number of child attributes present for this attribute. + * + * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attribute_count = 0; + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 10; + */ + protected $etag = ''; + /** + * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + * BigQuery dataset, BigQuery table). + * + * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_access_spec = null; + /** + * Optional. Specified when applied to data stored on the resource (eg: rows, + * columns in BigQuery Tables). + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_access_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the dataAttribute, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. + * @type string $uid + * Output only. System generated globally unique ID for the DataAttribute. + * This ID will be different if the DataAttribute is deleted and re-created + * with the same name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the DataAttribute was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the DataAttribute was last updated. + * @type string $description + * Optional. Description of the DataAttribute. + * @type string $display_name + * Optional. User friendly display name. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for the DataAttribute. + * @type string $parent_id + * Optional. The ID of the parent DataAttribute resource, should belong to the + * same data taxonomy. Circular dependency in parent chain is not valid. + * Maximum depth of the hierarchy allowed is 4. + * [a -> b -> c -> d -> e, depth = 4] + * @type int $attribute_count + * Output only. The number of child attributes present for this attribute. + * @type string $etag + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type \Google\Cloud\Dataplex\V1\ResourceAccessSpec $resource_access_spec + * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + * BigQuery dataset, BigQuery table). + * @type \Google\Cloud\Dataplex\V1\DataAccessSpec $data_access_spec + * Optional. Specified when applied to data stored on the resource (eg: rows, + * columns in BigQuery Tables). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the dataAttribute, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the dataAttribute, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the DataAttribute. + * This ID will be different if the DataAttribute is deleted and re-created + * with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the DataAttribute. + * This ID will be different if the DataAttribute is deleted and re-created + * with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the DataAttribute was created. + * + * 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. The time when the DataAttribute was created. + * + * 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. The time when the DataAttribute was last updated. + * + * 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. The time when the DataAttribute was last updated. + * + * 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. Description of the DataAttribute. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the DataAttribute. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. User-defined labels for the DataAttribute. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for the DataAttribute. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. The ID of the parent DataAttribute resource, should belong to the + * same data taxonomy. Circular dependency in parent chain is not valid. + * Maximum depth of the hierarchy allowed is 4. + * [a -> b -> c -> d -> e, depth = 4] + * + * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getParentId() + { + return $this->parent_id; + } + + /** + * Optional. The ID of the parent DataAttribute resource, should belong to the + * same data taxonomy. Circular dependency in parent chain is not valid. + * Maximum depth of the hierarchy allowed is 4. + * [a -> b -> c -> d -> e, depth = 4] + * + * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParentId($var) + { + GPBUtil::checkString($var, True); + $this->parent_id = $var; + + return $this; + } + + /** + * Output only. The number of child attributes present for this attribute. + * + * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAttributeCount() + { + return $this->attribute_count; + } + + /** + * Output only. The number of child attributes present for this attribute. + * + * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAttributeCount($var) + { + GPBUtil::checkInt32($var); + $this->attribute_count = $var; + + return $this; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 10; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 10; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + * BigQuery dataset, BigQuery table). + * + * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\ResourceAccessSpec|null + */ + public function getResourceAccessSpec() + { + return $this->resource_access_spec; + } + + public function hasResourceAccessSpec() + { + return isset($this->resource_access_spec); + } + + public function clearResourceAccessSpec() + { + unset($this->resource_access_spec); + } + + /** + * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + * BigQuery dataset, BigQuery table). + * + * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\ResourceAccessSpec $var + * @return $this + */ + public function setResourceAccessSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ResourceAccessSpec::class); + $this->resource_access_spec = $var; + + return $this; + } + + /** + * Optional. Specified when applied to data stored on the resource (eg: rows, + * columns in BigQuery Tables). + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataAccessSpec|null + */ + public function getDataAccessSpec() + { + return $this->data_access_spec; + } + + public function hasDataAccessSpec() + { + return isset($this->data_access_spec); + } + + public function clearDataAccessSpec() + { + unset($this->data_access_spec); + } + + /** + * Optional. Specified when applied to data stored on the resource (eg: rows, + * columns in BigQuery Tables). + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataAccessSpec $var + * @return $this + */ + public function setDataAccessSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAccessSpec::class); + $this->data_access_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php new file mode 100644 index 000000000000..0b04d11921e0 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php @@ -0,0 +1,492 @@ +google.cloud.dataplex.v1.DataAttributeBinding + */ +class DataAttributeBinding extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the Data Attribute Binding, of + * the form: + * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the + * DataAttributeBinding. This ID will be different if the DataAttributeBinding + * is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the DataAttributeBinding was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the DataAttributeBinding was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Description of the DataAttributeBinding. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. User-defined labels for the DataAttributeBinding. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * Etags must be used when calling the DeleteDataAttributeBinding and the + * UpdateDataAttributeBinding method. + * + * Generated from protobuf field string etag = 8; + */ + protected $etag = ''; + /** + * Optional. List of attributes to be associated with the resource, provided + * in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $attributes; + /** + * Optional. The list of paths for items within the associated resource (eg. + * columns and partitions within a table) along with attribute bindings. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $paths; + protected $resource_reference; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the Data Attribute Binding, of + * the form: + * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + * @type string $uid + * Output only. System generated globally unique ID for the + * DataAttributeBinding. This ID will be different if the DataAttributeBinding + * is deleted and re-created with the same name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the DataAttributeBinding was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the DataAttributeBinding was last updated. + * @type string $description + * Optional. Description of the DataAttributeBinding. + * @type string $display_name + * Optional. User friendly display name. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for the DataAttributeBinding. + * @type string $etag + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * Etags must be used when calling the DeleteDataAttributeBinding and the + * UpdateDataAttributeBinding method. + * @type string $resource + * Optional. Immutable. The resource name of the resource that is associated + * to attributes. Presently, only entity resource is supported in the form: + * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} + * Must belong in the same project and region as the attribute binding, and + * there can only exist one active binding for a resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $attributes + * Optional. List of attributes to be associated with the resource, provided + * in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @type array<\Google\Cloud\Dataplex\V1\DataAttributeBinding\Path>|\Google\Protobuf\Internal\RepeatedField $paths + * Optional. The list of paths for items within the associated resource (eg. + * columns and partitions within a table) along with attribute bindings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the Data Attribute Binding, of + * the form: + * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the Data Attribute Binding, of + * the form: + * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the + * DataAttributeBinding. This ID will be different if the DataAttributeBinding + * is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the + * DataAttributeBinding. This ID will be different if the DataAttributeBinding + * is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the DataAttributeBinding was created. + * + * 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. The time when the DataAttributeBinding was created. + * + * 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. The time when the DataAttributeBinding was last updated. + * + * 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. The time when the DataAttributeBinding was last updated. + * + * 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. Description of the DataAttributeBinding. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the DataAttributeBinding. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. User-defined labels for the DataAttributeBinding. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for the DataAttributeBinding. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * Etags must be used when calling the DeleteDataAttributeBinding and the + * UpdateDataAttributeBinding method. + * + * Generated from protobuf field string etag = 8; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * Etags must be used when calling the DeleteDataAttributeBinding and the + * UpdateDataAttributeBinding method. + * + * Generated from protobuf field string etag = 8; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Immutable. The resource name of the resource that is associated + * to attributes. Presently, only entity resource is supported in the form: + * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} + * Must belong in the same project and region as the attribute binding, and + * there can only exist one active binding for a resource. + * + * Generated from protobuf field string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResource() + { + return $this->readOneof(100); + } + + public function hasResource() + { + return $this->hasOneof(100); + } + + /** + * Optional. Immutable. The resource name of the resource that is associated + * to attributes. Presently, only entity resource is supported in the form: + * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} + * Must belong in the same project and region as the attribute binding, and + * there can only exist one active binding for a resource. + * + * Generated from protobuf field string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Optional. List of attributes to be associated with the resource, provided + * in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Optional. List of attributes to be associated with the resource, provided + * in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->attributes = $arr; + + return $this; + } + + /** + * Optional. The list of paths for items within the associated resource (eg. + * columns and partitions within a table) along with attribute bindings. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPaths() + { + return $this->paths; + } + + /** + * Optional. The list of paths for items within the associated resource (eg. + * columns and partitions within a table) along with attribute bindings. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dataplex\V1\DataAttributeBinding\Path>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPaths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttributeBinding\Path::class); + $this->paths = $arr; + + return $this; + } + + /** + * @return string + */ + public function getResourceReference() + { + return $this->whichOneof("resource_reference"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php new file mode 100644 index 000000000000..ea8acf4f071e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php @@ -0,0 +1,118 @@ +google.cloud.dataplex.v1.DataAttributeBinding.Path + */ +class Path extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name identifier of the path. + * Nested columns should be of the form: 'address.city'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. List of attributes to be associated with the path of the + * resource, provided in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name identifier of the path. + * Nested columns should be of the form: 'address.city'. + * @type array|\Google\Protobuf\Internal\RepeatedField $attributes + * Optional. List of attributes to be associated with the path of the + * resource, provided in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name identifier of the path. + * Nested columns should be of the form: 'address.city'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name identifier of the path. + * Nested columns should be of the form: 'address.city'. + * + * 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; + } + + /** + * Optional. List of attributes to be associated with the path of the + * resource, provided in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Optional. List of attributes to be associated with the path of the + * resource, provided in the form: + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->attributes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Path::class, \Google\Cloud\Dataplex\V1\DataAttributeBinding_Path::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php new file mode 100644 index 000000000000..ec707235fd6c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php @@ -0,0 +1,200 @@ +google.cloud.dataplex.v1.DataProfileResult + */ +class DataProfileResult extends \Google\Protobuf\Internal\Message +{ + /** + * The count of rows scanned. + * + * Generated from protobuf field int64 row_count = 3; + */ + protected $row_count = 0; + /** + * The profile information per field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; + */ + protected $profile = null; + /** + * The data scanned for this result. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; + */ + protected $scanned_data = null; + /** + * Output only. The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $post_scan_actions_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $row_count + * The count of rows scanned. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile $profile + * The profile information per field. + * @type \Google\Cloud\Dataplex\V1\ScannedData $scanned_data + * The data scanned for this result. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult $post_scan_actions_result + * Output only. The result of post scan actions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * The count of rows scanned. + * + * Generated from protobuf field int64 row_count = 3; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The count of rows scanned. + * + * Generated from protobuf field int64 row_count = 3; + * @param int|string $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + + /** + * The profile information per field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile|null + */ + public function getProfile() + { + return $this->profile; + } + + public function hasProfile() + { + return isset($this->profile); + } + + public function clearProfile() + { + unset($this->profile); + } + + /** + * The profile information per field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile::class); + $this->profile = $var; + + return $this; + } + + /** + * The data scanned for this result. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; + * @return \Google\Cloud\Dataplex\V1\ScannedData|null + */ + public function getScannedData() + { + return $this->scanned_data; + } + + public function hasScannedData() + { + return isset($this->scanned_data); + } + + public function clearScannedData() + { + unset($this->scanned_data); + } + + /** + * The data scanned for this result. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; + * @param \Google\Cloud\Dataplex\V1\ScannedData $var + * @return $this + */ + public function setScannedData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData::class); + $this->scanned_data = $var; + + return $this; + } + + /** + * Output only. The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult|null + */ + public function getPostScanActionsResult() + { + return $this->post_scan_actions_result; + } + + public function hasPostScanActionsResult() + { + return isset($this->post_scan_actions_result); + } + + public function clearPostScanActionsResult() + { + unset($this->post_scan_actions_result); + } + + /** + * Output only. The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult $var + * @return $this + */ + public function setPostScanActionsResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult::class); + $this->post_scan_actions_result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php new file mode 100644 index 000000000000..9079ae4ede3d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php @@ -0,0 +1,80 @@ +google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + */ +class PostScanActionsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $bigquery_export_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult $bigquery_export_result + * Output only. The result of BigQuery export post scan action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult|null + */ + public function getBigqueryExportResult() + { + return $this->bigquery_export_result; + } + + public function hasBigqueryExportResult() + { + return isset($this->bigquery_export_result); + } + + public function clearBigqueryExportResult() + { + unset($this->bigquery_export_result); + } + + /** + * Output only. The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult $var + * @return $this + */ + public function setBigqueryExportResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult::class); + $this->bigquery_export_result = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php new file mode 100644 index 000000000000..27ad4e98a6b0 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php @@ -0,0 +1,104 @@ +google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + */ +class BigQueryExportResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. Execution state for the BigQuery exporting. + * @type string $message + * Output only. Additional information about the BigQuery exporting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Output only. Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult_BigQueryExportResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php new file mode 100644 index 000000000000..9b25526359e4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php @@ -0,0 +1,72 @@ +google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State + */ +class State +{ + /** + * The exporting state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The exporting completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 1; + */ + const SUCCEEDED = 1; + /** + * The exporting is no longer running due to an error. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The exporting is skipped due to no valid scan result to export + * (usually caused by scan failed). + * + * Generated from protobuf enum SKIPPED = 3; + */ + const SKIPPED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::SKIPPED => 'SKIPPED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult_BigQueryExportResult_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php new file mode 100644 index 000000000000..d65af5ea5427 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php @@ -0,0 +1,70 @@ +google.cloud.dataplex.v1.DataProfileResult.Profile + */ +class Profile extends \Google\Protobuf\Internal\Message +{ + /** + * List of fields with structural and profile information for each field. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field>|\Google\Protobuf\Internal\RepeatedField $fields + * List of fields with structural and profile information for each field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * List of fields with structural and profile information for each field. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * List of fields with structural and profile information for each field. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; + * @param array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field::class); + $this->fields = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Profile::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php new file mode 100644 index 000000000000..f54274be71f4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php @@ -0,0 +1,210 @@ +google.cloud.dataplex.v1.DataProfileResult.Profile.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the field. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The data type retrieved from the schema of the data source. For + * instance, for a BigQuery native table, it is the [BigQuery Table + * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). + * For a Dataplex Entity, it is the [Entity + * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * The mode of the field. Possible values include: + * * REQUIRED, if it is a required field. + * * NULLABLE, if it is an optional field. + * * REPEATED, if it is a repeated field. + * + * Generated from protobuf field string mode = 3; + */ + protected $mode = ''; + /** + * Profile information for the corresponding field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; + */ + protected $profile = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the field. + * @type string $type + * The data type retrieved from the schema of the data source. For + * instance, for a BigQuery native table, it is the [BigQuery Table + * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). + * For a Dataplex Entity, it is the [Entity + * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). + * @type string $mode + * The mode of the field. Possible values include: + * * REQUIRED, if it is a required field. + * * NULLABLE, if it is an optional field. + * * REPEATED, if it is a repeated field. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $profile + * Profile information for the corresponding field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * The name of the field. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the field. + * + * 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; + } + + /** + * The data type retrieved from the schema of the data source. For + * instance, for a BigQuery native table, it is the [BigQuery Table + * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). + * For a Dataplex Entity, it is the [Entity + * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The data type retrieved from the schema of the data source. For + * instance, for a BigQuery native table, it is the [BigQuery Table + * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). + * For a Dataplex Entity, it is the [Entity + * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The mode of the field. Possible values include: + * * REQUIRED, if it is a required field. + * * NULLABLE, if it is an optional field. + * * REPEATED, if it is a repeated field. + * + * Generated from protobuf field string mode = 3; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * The mode of the field. Possible values include: + * * REQUIRED, if it is a required field. + * * NULLABLE, if it is an optional field. + * * REPEATED, if it is a repeated field. + * + * Generated from protobuf field string mode = 3; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * Profile information for the corresponding field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo|null + */ + public function getProfile() + { + return $this->profile; + } + + public function hasProfile() + { + return isset($this->profile); + } + + public function clearProfile() + { + unset($this->profile); + } + + /** + * Profile information for the corresponding field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo::class); + $this->profile = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Field::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php new file mode 100644 index 000000000000..87b2797462ae --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php @@ -0,0 +1,270 @@ +google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + */ +class ProfileInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Ratio of rows with null value against total scanned rows. + * + * Generated from protobuf field double null_ratio = 2; + */ + protected $null_ratio = 0.0; + /** + * Ratio of rows with distinct values against total scanned rows. + * Not available for complex non-groupable field type RECORD and fields + * with REPEATABLE mode. + * + * Generated from protobuf field double distinct_ratio = 3; + */ + protected $distinct_ratio = 0.0; + /** + * The list of top N non-null values, frequency and ratio with which + * they occur in the scanned data. N is 10 or equal to the number of + * distinct values in the field, whichever is smaller. Not available for + * complex non-groupable field type RECORD and fields with REPEATABLE + * mode. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; + */ + private $top_n_values; + protected $field_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $null_ratio + * Ratio of rows with null value against total scanned rows. + * @type float $distinct_ratio + * Ratio of rows with distinct values against total scanned rows. + * Not available for complex non-groupable field type RECORD and fields + * with REPEATABLE mode. + * @type array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue>|\Google\Protobuf\Internal\RepeatedField $top_n_values + * The list of top N non-null values, frequency and ratio with which + * they occur in the scanned data. N is 10 or equal to the number of + * distinct values in the field, whichever is smaller. Not available for + * complex non-groupable field type RECORD and fields with REPEATABLE + * mode. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo $string_profile + * String type field information. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo $integer_profile + * Integer type field information. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo $double_profile + * Double type field information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Ratio of rows with null value against total scanned rows. + * + * Generated from protobuf field double null_ratio = 2; + * @return float + */ + public function getNullRatio() + { + return $this->null_ratio; + } + + /** + * Ratio of rows with null value against total scanned rows. + * + * Generated from protobuf field double null_ratio = 2; + * @param float $var + * @return $this + */ + public function setNullRatio($var) + { + GPBUtil::checkDouble($var); + $this->null_ratio = $var; + + return $this; + } + + /** + * Ratio of rows with distinct values against total scanned rows. + * Not available for complex non-groupable field type RECORD and fields + * with REPEATABLE mode. + * + * Generated from protobuf field double distinct_ratio = 3; + * @return float + */ + public function getDistinctRatio() + { + return $this->distinct_ratio; + } + + /** + * Ratio of rows with distinct values against total scanned rows. + * Not available for complex non-groupable field type RECORD and fields + * with REPEATABLE mode. + * + * Generated from protobuf field double distinct_ratio = 3; + * @param float $var + * @return $this + */ + public function setDistinctRatio($var) + { + GPBUtil::checkDouble($var); + $this->distinct_ratio = $var; + + return $this; + } + + /** + * The list of top N non-null values, frequency and ratio with which + * they occur in the scanned data. N is 10 or equal to the number of + * distinct values in the field, whichever is smaller. Not available for + * complex non-groupable field type RECORD and fields with REPEATABLE + * mode. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopNValues() + { + return $this->top_n_values; + } + + /** + * The list of top N non-null values, frequency and ratio with which + * they occur in the scanned data. N is 10 or equal to the number of + * distinct values in the field, whichever is smaller. Not available for + * complex non-groupable field type RECORD and fields with REPEATABLE + * mode. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; + * @param array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopNValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue::class); + $this->top_n_values = $arr; + + return $this; + } + + /** + * String type field information. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo string_profile = 101; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo|null + */ + public function getStringProfile() + { + return $this->readOneof(101); + } + + public function hasStringProfile() + { + return $this->hasOneof(101); + } + + /** + * String type field information. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo string_profile = 101; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo $var + * @return $this + */ + public function setStringProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Integer type field information. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo integer_profile = 102; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo|null + */ + public function getIntegerProfile() + { + return $this->readOneof(102); + } + + public function hasIntegerProfile() + { + return $this->hasOneof(102); + } + + /** + * Integer type field information. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo integer_profile = 102; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo $var + * @return $this + */ + public function setIntegerProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Double type field information. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo double_profile = 103; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo|null + */ + public function getDoubleProfile() + { + return $this->readOneof(103); + } + + public function hasDoubleProfile() + { + return $this->hasOneof(103); + } + + /** + * Double type field information. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo double_profile = 103; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo $var + * @return $this + */ + public function setDoubleProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * @return string + */ + public function getFieldInfo() + { + return $this->whichOneof("field_info"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProfileInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php new file mode 100644 index 000000000000..ad1f6ba21fdd --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php @@ -0,0 +1,262 @@ +google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + */ +class DoubleFieldInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double average = 1; + */ + protected $average = 0.0; + /** + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * + * Generated from protobuf field double standard_deviation = 3; + */ + protected $standard_deviation = 0.0; + /** + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double min = 4; + */ + protected $min = 0.0; + /** + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of quartile + * values for the scanned data, occurring in order Q1, median, Q3. + * + * Generated from protobuf field repeated double quartiles = 6; + */ + private $quartiles; + /** + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double max = 5; + */ + protected $max = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $average + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * @type float $standard_deviation + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * @type float $min + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * @type array|\Google\Protobuf\Internal\RepeatedField $quartiles + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of quartile + * values for the scanned data, occurring in order Q1, median, Q3. + * @type float $max + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double average = 1; + * @return float + */ + public function getAverage() + { + return $this->average; + } + + /** + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double average = 1; + * @param float $var + * @return $this + */ + public function setAverage($var) + { + GPBUtil::checkDouble($var); + $this->average = $var; + + return $this; + } + + /** + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * + * Generated from protobuf field double standard_deviation = 3; + * @return float + */ + public function getStandardDeviation() + { + return $this->standard_deviation; + } + + /** + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * + * Generated from protobuf field double standard_deviation = 3; + * @param float $var + * @return $this + */ + public function setStandardDeviation($var) + { + GPBUtil::checkDouble($var); + $this->standard_deviation = $var; + + return $this; + } + + /** + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double min = 4; + * @return float + */ + public function getMin() + { + return $this->min; + } + + /** + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double min = 4; + * @param float $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkDouble($var); + $this->min = $var; + + return $this; + } + + /** + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of quartile + * values for the scanned data, occurring in order Q1, median, Q3. + * + * Generated from protobuf field repeated double quartiles = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQuartiles() + { + return $this->quartiles; + } + + /** + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of quartile + * values for the scanned data, occurring in order Q1, median, Q3. + * + * Generated from protobuf field repeated double quartiles = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQuartiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->quartiles = $arr; + + return $this; + } + + /** + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double max = 5; + * @return float + */ + public function getMax() + { + return $this->max; + } + + /** + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double max = 5; + * @param float $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkDouble($var); + $this->max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DoubleFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php new file mode 100644 index 000000000000..c0cfc703d405 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php @@ -0,0 +1,266 @@ +google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + */ +class IntegerFieldInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double average = 1; + */ + protected $average = 0.0; + /** + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * + * Generated from protobuf field double standard_deviation = 3; + */ + protected $standard_deviation = 0.0; + /** + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field int64 min = 4; + */ + protected $min = 0; + /** + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. + * + * Generated from protobuf field repeated int64 quartiles = 6; + */ + private $quartiles; + /** + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field int64 max = 5; + */ + protected $max = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $average + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * @type float $standard_deviation + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * @type int|string $min + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $quartiles + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. + * @type int|string $max + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double average = 1; + * @return float + */ + public function getAverage() + { + return $this->average; + } + + /** + * Average of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field double average = 1; + * @param float $var + * @return $this + */ + public function setAverage($var) + { + GPBUtil::checkDouble($var); + $this->average = $var; + + return $this; + } + + /** + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * + * Generated from protobuf field double standard_deviation = 3; + * @return float + */ + public function getStandardDeviation() + { + return $this->standard_deviation; + } + + /** + * Standard deviation of non-null values in the scanned data. NaN, if + * the field has a NaN. + * + * Generated from protobuf field double standard_deviation = 3; + * @param float $var + * @return $this + */ + public function setStandardDeviation($var) + { + GPBUtil::checkDouble($var); + $this->standard_deviation = $var; + + return $this; + } + + /** + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field int64 min = 4; + * @return int|string + */ + public function getMin() + { + return $this->min; + } + + /** + * Minimum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field int64 min = 4; + * @param int|string $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkInt64($var); + $this->min = $var; + + return $this; + } + + /** + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. + * + * Generated from protobuf field repeated int64 quartiles = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQuartiles() + { + return $this->quartiles; + } + + /** + * A quartile divides the number of data points into four parts, or + * quarters, of more-or-less equal size. Three main quartiles used + * are: The first quartile (Q1) splits off the lowest 25% of data from + * the highest 75%. It is also known as the lower or 25th empirical + * quartile, as 25% of the data is below this point. The second + * quartile (Q2) is the median of a data set. So, 50% of the data lies + * below this point. The third quartile (Q3) splits off the highest + * 25% of data from the lowest 75%. It is known as the upper or 75th + * empirical quartile, as 75% of the data lies below this point. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. + * + * Generated from protobuf field repeated int64 quartiles = 6; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQuartiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->quartiles = $arr; + + return $this; + } + + /** + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field int64 max = 5; + * @return int|string + */ + public function getMax() + { + return $this->max; + } + + /** + * Maximum of non-null values in the scanned data. NaN, if the field + * has a NaN. + * + * Generated from protobuf field int64 max = 5; + * @param int|string $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkInt64($var); + $this->max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IntegerFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php new file mode 100644 index 000000000000..b1dc69020a8f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php @@ -0,0 +1,138 @@ +google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + */ +class StringFieldInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Minimum length of non-null values in the scanned data. + * + * Generated from protobuf field int64 min_length = 1; + */ + protected $min_length = 0; + /** + * Maximum length of non-null values in the scanned data. + * + * Generated from protobuf field int64 max_length = 2; + */ + protected $max_length = 0; + /** + * Average length of non-null values in the scanned data. + * + * Generated from protobuf field double average_length = 3; + */ + protected $average_length = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $min_length + * Minimum length of non-null values in the scanned data. + * @type int|string $max_length + * Maximum length of non-null values in the scanned data. + * @type float $average_length + * Average length of non-null values in the scanned data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Minimum length of non-null values in the scanned data. + * + * Generated from protobuf field int64 min_length = 1; + * @return int|string + */ + public function getMinLength() + { + return $this->min_length; + } + + /** + * Minimum length of non-null values in the scanned data. + * + * Generated from protobuf field int64 min_length = 1; + * @param int|string $var + * @return $this + */ + public function setMinLength($var) + { + GPBUtil::checkInt64($var); + $this->min_length = $var; + + return $this; + } + + /** + * Maximum length of non-null values in the scanned data. + * + * Generated from protobuf field int64 max_length = 2; + * @return int|string + */ + public function getMaxLength() + { + return $this->max_length; + } + + /** + * Maximum length of non-null values in the scanned data. + * + * Generated from protobuf field int64 max_length = 2; + * @param int|string $var + * @return $this + */ + public function setMaxLength($var) + { + GPBUtil::checkInt64($var); + $this->max_length = $var; + + return $this; + } + + /** + * Average length of non-null values in the scanned data. + * + * Generated from protobuf field double average_length = 3; + * @return float + */ + public function getAverageLength() + { + return $this->average_length; + } + + /** + * Average length of non-null values in the scanned data. + * + * Generated from protobuf field double average_length = 3; + * @param float $var + * @return $this + */ + public function setAverageLength($var) + { + GPBUtil::checkDouble($var); + $this->average_length = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StringFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php new file mode 100644 index 000000000000..52c084f07d58 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php @@ -0,0 +1,142 @@ +google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + */ +class TopNValue extends \Google\Protobuf\Internal\Message +{ + /** + * String value of a top N non-null value. + * + * Generated from protobuf field string value = 1; + */ + protected $value = ''; + /** + * Count of the corresponding value in the scanned data. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + /** + * Ratio of the corresponding value in the field against the total + * number of rows in the scanned data. + * + * Generated from protobuf field double ratio = 3; + */ + protected $ratio = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * String value of a top N non-null value. + * @type int|string $count + * Count of the corresponding value in the scanned data. + * @type float $ratio + * Ratio of the corresponding value in the field against the total + * number of rows in the scanned data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * String value of a top N non-null value. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * String value of a top N non-null value. + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Count of the corresponding value in the scanned data. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Count of the corresponding value in the scanned data. + * + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Ratio of the corresponding value in the field against the total + * number of rows in the scanned data. + * + * Generated from protobuf field double ratio = 3; + * @return float + */ + public function getRatio() + { + return $this->ratio; + } + + /** + * Ratio of the corresponding value in the field against the total + * number of rows in the scanned data. + * + * Generated from protobuf field double ratio = 3; + * @param float $var + * @return $this + */ + public function setRatio($var) + { + GPBUtil::checkDouble($var); + $this->ratio = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TopNValue::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_TopNValue::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php new file mode 100644 index 000000000000..9451a8623510 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php @@ -0,0 +1,281 @@ +google.cloud.dataplex.v1.DataProfileSpec + */ +class DataProfileSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * + * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sampling_percent = 0.0; + /** + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * + * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $row_filter = ''; + /** + * Optional. Actions to take upon job completion.. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $post_scan_actions = null; + /** + * Optional. The fields to include in data profile. + * If not specified, all fields at the time of profile scan job execution are + * included, except for ones listed in `exclude_fields`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $include_fields = null; + /** + * Optional. The fields to exclude from data profile. + * If specified, the fields will be excluded from data profile, regardless of + * `include_fields` value. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $exclude_fields = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $sampling_percent + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * @type string $row_filter + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions $post_scan_actions + * Optional. Actions to take upon job completion.. + * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $include_fields + * Optional. The fields to include in data profile. + * If not specified, all fields at the time of profile scan job execution are + * included, except for ones listed in `exclude_fields`. + * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $exclude_fields + * Optional. The fields to exclude from data profile. + * If specified, the fields will be excluded from data profile, regardless of + * `include_fields` value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * + * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getSamplingPercent() + { + return $this->sampling_percent; + } + + /** + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * + * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setSamplingPercent($var) + { + GPBUtil::checkFloat($var); + $this->sampling_percent = $var; + + return $this; + } + + /** + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * + * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRowFilter() + { + return $this->row_filter; + } + + /** + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * + * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRowFilter($var) + { + GPBUtil::checkString($var, True); + $this->row_filter = $var; + + return $this; + } + + /** + * Optional. Actions to take upon job completion.. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions|null + */ + public function getPostScanActions() + { + return $this->post_scan_actions; + } + + public function hasPostScanActions() + { + return isset($this->post_scan_actions); + } + + public function clearPostScanActions() + { + unset($this->post_scan_actions); + } + + /** + * Optional. Actions to take upon job completion.. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions $var + * @return $this + */ + public function setPostScanActions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions::class); + $this->post_scan_actions = $var; + + return $this; + } + + /** + * Optional. The fields to include in data profile. + * If not specified, all fields at the time of profile scan job execution are + * included, except for ones listed in `exclude_fields`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields|null + */ + public function getIncludeFields() + { + return $this->include_fields; + } + + public function hasIncludeFields() + { + return isset($this->include_fields); + } + + public function clearIncludeFields() + { + unset($this->include_fields); + } + + /** + * Optional. The fields to include in data profile. + * If not specified, all fields at the time of profile scan job execution are + * included, except for ones listed in `exclude_fields`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $var + * @return $this + */ + public function setIncludeFields($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields::class); + $this->include_fields = $var; + + return $this; + } + + /** + * Optional. The fields to exclude from data profile. + * If specified, the fields will be excluded from data profile, regardless of + * `include_fields` value. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields|null + */ + public function getExcludeFields() + { + return $this->exclude_fields; + } + + public function hasExcludeFields() + { + return isset($this->exclude_fields); + } + + public function clearExcludeFields() + { + unset($this->exclude_fields); + } + + /** + * Optional. The fields to exclude from data profile. + * If specified, the fields will be excluded from data profile, regardless of + * `include_fields` value. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $var + * @return $this + */ + public function setExcludeFields($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields::class); + $this->exclude_fields = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php new file mode 100644 index 000000000000..c6c1e01f3466 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php @@ -0,0 +1,84 @@ +google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + */ +class PostScanActions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If set, results will be exported to the provided BigQuery + * table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $bigquery_export = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport $bigquery_export + * Optional. If set, results will be exported to the provided BigQuery + * table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If set, results will be exported to the provided BigQuery + * table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport|null + */ + public function getBigqueryExport() + { + return $this->bigquery_export; + } + + public function hasBigqueryExport() + { + return isset($this->bigquery_export); + } + + public function clearBigqueryExport() + { + unset($this->bigquery_export); + } + + /** + * Optional. If set, results will be exported to the provided BigQuery + * table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport $var + * @return $this + */ + public function setBigqueryExport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport::class); + $this->bigquery_export = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostScanActions::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_PostScanActions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php new file mode 100644 index 000000000000..55cc182ed0f5 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php @@ -0,0 +1,78 @@ +google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + */ +class BigQueryExport extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The BigQuery table to export DataProfileScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $results_table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $results_table + * Optional. The BigQuery table to export DataProfileScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The BigQuery table to export DataProfileScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getResultsTable() + { + return $this->results_table; + } + + /** + * Optional. The BigQuery table to export DataProfileScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setResultsTable($var) + { + GPBUtil::checkString($var, True); + $this->results_table = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryExport::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_PostScanActions_BigQueryExport::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php new file mode 100644 index 000000000000..f69dc8885de9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php @@ -0,0 +1,90 @@ +google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + */ +class SelectedFields extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Expected input is a list of fully qualified names of fields as + * in the schema. + * Only top-level field names for nested fields are supported. + * For instance, if 'x' is of nested field type, listing 'x' is supported + * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of + * 'x'. + * + * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $field_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $field_names + * Optional. Expected input is a list of fully qualified names of fields as + * in the schema. + * Only top-level field names for nested fields are supported. + * For instance, if 'x' is of nested field type, listing 'x' is supported + * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of + * 'x'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Expected input is a list of fully qualified names of fields as + * in the schema. + * Only top-level field names for nested fields are supported. + * For instance, if 'x' is of nested field type, listing 'x' is supported + * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of + * 'x'. + * + * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFieldNames() + { + return $this->field_names; + } + + /** + * Optional. Expected input is a list of fully qualified names of fields as + * in the schema. + * Only top-level field names for nested fields are supported. + * For instance, if 'x' is of nested field type, listing 'x' is supported + * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of + * 'x'. + * + * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFieldNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->field_names = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SelectedFields::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_SelectedFields::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php new file mode 100644 index 000000000000..dbc14cbdc2de --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php @@ -0,0 +1,76 @@ +google.cloud.dataplex.v1.DataQualityDimension + */ +class DataQualityDimension extends \Google\Protobuf\Internal\Message +{ + /** + * The dimension name a rule belongs to. Supported dimensions are + * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", + * "INTEGRITY"] + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The dimension name a rule belongs to. Supported dimensions are + * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", + * "INTEGRITY"] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * The dimension name a rule belongs to. Supported dimensions are + * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", + * "INTEGRITY"] + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The dimension name a rule belongs to. Supported dimensions are + * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", + * "INTEGRITY"] + * + * 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; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php new file mode 100644 index 000000000000..bc114bb69356 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php @@ -0,0 +1,112 @@ +google.cloud.dataplex.v1.DataQualityDimensionResult + */ +class DataQualityDimensionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The dimension config specified in the DataQualitySpec, as is. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dimension = null; + /** + * Whether the dimension passed or failed. + * + * Generated from protobuf field bool passed = 3; + */ + protected $passed = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataQualityDimension $dimension + * Output only. The dimension config specified in the DataQualitySpec, as is. + * @type bool $passed + * Whether the dimension passed or failed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The dimension config specified in the DataQualitySpec, as is. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataQualityDimension|null + */ + public function getDimension() + { + return $this->dimension; + } + + public function hasDimension() + { + return isset($this->dimension); + } + + public function clearDimension() + { + unset($this->dimension); + } + + /** + * Output only. The dimension config specified in the DataQualitySpec, as is. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataQualityDimension $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityDimension::class); + $this->dimension = $var; + + return $this; + } + + /** + * Whether the dimension passed or failed. + * + * Generated from protobuf field bool passed = 3; + * @return bool + */ + public function getPassed() + { + return $this->passed; + } + + /** + * Whether the dimension passed or failed. + * + * Generated from protobuf field bool passed = 3; + * @param bool $var + * @return $this + */ + public function setPassed($var) + { + GPBUtil::checkBool($var); + $this->passed = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php new file mode 100644 index 000000000000..eb9f4e4c1616 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php @@ -0,0 +1,265 @@ +google.cloud.dataplex.v1.DataQualityResult + */ +class DataQualityResult extends \Google\Protobuf\Internal\Message +{ + /** + * Overall data quality result -- `true` if all rules passed. + * + * Generated from protobuf field bool passed = 5; + */ + protected $passed = false; + /** + * A list of results at the dimension level. + * A dimension will have a corresponding `DataQualityDimensionResult` if and + * only if there is at least one rule with the 'dimension' field set to it. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; + */ + private $dimensions; + /** + * A list of all the rules in a job, and their results. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; + */ + private $rules; + /** + * The count of rows processed. + * + * Generated from protobuf field int64 row_count = 4; + */ + protected $row_count = 0; + /** + * The data scanned for this result. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; + */ + protected $scanned_data = null; + /** + * Output only. The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $post_scan_actions_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $passed + * Overall data quality result -- `true` if all rules passed. + * @type array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $dimensions + * A list of results at the dimension level. + * A dimension will have a corresponding `DataQualityDimensionResult` if and + * only if there is at least one rule with the 'dimension' field set to it. + * @type array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $rules + * A list of all the rules in a job, and their results. + * @type int|string $row_count + * The count of rows processed. + * @type \Google\Cloud\Dataplex\V1\ScannedData $scanned_data + * The data scanned for this result. + * @type \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult $post_scan_actions_result + * Output only. The result of post scan actions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Overall data quality result -- `true` if all rules passed. + * + * Generated from protobuf field bool passed = 5; + * @return bool + */ + public function getPassed() + { + return $this->passed; + } + + /** + * Overall data quality result -- `true` if all rules passed. + * + * Generated from protobuf field bool passed = 5; + * @param bool $var + * @return $this + */ + public function setPassed($var) + { + GPBUtil::checkBool($var); + $this->passed = $var; + + return $this; + } + + /** + * A list of results at the dimension level. + * A dimension will have a corresponding `DataQualityDimensionResult` if and + * only if there is at least one rule with the 'dimension' field set to it. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDimensions() + { + return $this->dimensions; + } + + /** + * A list of results at the dimension level. + * A dimension will have a corresponding `DataQualityDimensionResult` if and + * only if there is at least one rule with the 'dimension' field set to it. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; + * @param array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDimensions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityDimensionResult::class); + $this->dimensions = $arr; + + return $this; + } + + /** + * A list of all the rules in a job, and their results. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * A list of all the rules in a job, and their results. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; + * @param array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRuleResult::class); + $this->rules = $arr; + + return $this; + } + + /** + * The count of rows processed. + * + * Generated from protobuf field int64 row_count = 4; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The count of rows processed. + * + * Generated from protobuf field int64 row_count = 4; + * @param int|string $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + + /** + * The data scanned for this result. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; + * @return \Google\Cloud\Dataplex\V1\ScannedData|null + */ + public function getScannedData() + { + return $this->scanned_data; + } + + public function hasScannedData() + { + return isset($this->scanned_data); + } + + public function clearScannedData() + { + unset($this->scanned_data); + } + + /** + * The data scanned for this result. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; + * @param \Google\Cloud\Dataplex\V1\ScannedData $var + * @return $this + */ + public function setScannedData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData::class); + $this->scanned_data = $var; + + return $this; + } + + /** + * Output only. The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult|null + */ + public function getPostScanActionsResult() + { + return $this->post_scan_actions_result; + } + + public function hasPostScanActionsResult() + { + return isset($this->post_scan_actions_result); + } + + public function clearPostScanActionsResult() + { + unset($this->post_scan_actions_result); + } + + /** + * Output only. The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult $var + * @return $this + */ + public function setPostScanActionsResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult::class); + $this->post_scan_actions_result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php new file mode 100644 index 000000000000..2b58624056bc --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php @@ -0,0 +1,80 @@ +google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + */ +class PostScanActionsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $bigquery_export_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult $bigquery_export_result + * Output only. The result of BigQuery export post scan action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult|null + */ + public function getBigqueryExportResult() + { + return $this->bigquery_export_result; + } + + public function hasBigqueryExportResult() + { + return isset($this->bigquery_export_result); + } + + public function clearBigqueryExportResult() + { + unset($this->bigquery_export_result); + } + + /** + * Output only. The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult $var + * @return $this + */ + public function setBigqueryExportResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult::class); + $this->bigquery_export_result = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php new file mode 100644 index 000000000000..8f4f124efb15 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php @@ -0,0 +1,104 @@ +google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + */ +class BigQueryExportResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. Execution state for the BigQuery exporting. + * @type string $message + * Output only. Additional information about the BigQuery exporting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Output only. Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult_BigQueryExportResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php new file mode 100644 index 000000000000..39f3c3bedfa3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php @@ -0,0 +1,72 @@ +google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State + */ +class State +{ + /** + * The exporting state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The exporting completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 1; + */ + const SUCCEEDED = 1; + /** + * The exporting is no longer running due to an error. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The exporting is skipped due to no valid scan result to export + * (usually caused by scan failed). + * + * Generated from protobuf enum SKIPPED = 3; + */ + const SKIPPED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::SKIPPED => 'SKIPPED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult_BigQueryExportResult_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php new file mode 100644 index 000000000000..c01add91b263 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php @@ -0,0 +1,584 @@ +google.cloud.dataplex.v1.DataQualityRule + */ +class DataQualityRule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The unnested column which this rule is evaluated against. + * + * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $column = ''; + /** + * Optional. Rows with `null` values will automatically fail a rule, unless + * `ignore_null` is `true`. In that case, such `null` rows are trivially + * considered passing. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_null = false; + /** + * Required. The dimension a rule belongs to. Results are also aggregated at + * the dimension level. Supported dimensions are **["COMPLETENESS", + * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** + * + * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dimension = ''; + /** + * Optional. The minimum ratio of **passing_rows / total_rows** required to + * pass this rule, with a range of [0.0, 1.0]. + * 0 indicates default value (i.e. 1.0). + * This field is only valid for row-level type rules. + * + * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threshold = 0.0; + /** + * Optional. A mutable name for the rule. + * * The name must contain only letters (a-z, A-Z), numbers (0-9), or + * hyphens (-). + * * The maximum length is 63 characters. + * * Must start with a letter. + * * Must end with a number or a letter. + * + * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * Optional. Description of the rule. + * * The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + protected $rule_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation $range_expectation + * Row-level rule which evaluates whether each column value lies between a + * specified range. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation $non_null_expectation + * Row-level rule which evaluates whether each column value is null. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation $set_expectation + * Row-level rule which evaluates whether each column value is contained by + * a specified set. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation $regex_expectation + * Row-level rule which evaluates whether each column value matches a + * specified regex. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation $uniqueness_expectation + * Row-level rule which evaluates whether each column value is unique. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation $statistic_range_expectation + * Aggregate rule which evaluates whether the column aggregate + * statistic lies between a specified range. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation $row_condition_expectation + * Row-level rule which evaluates whether each row in a table passes the + * specified condition. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $table_condition_expectation + * Aggregate rule which evaluates whether the provided expression is true + * for a table. + * @type string $column + * Optional. The unnested column which this rule is evaluated against. + * @type bool $ignore_null + * Optional. Rows with `null` values will automatically fail a rule, unless + * `ignore_null` is `true`. In that case, such `null` rows are trivially + * considered passing. + * This field is only valid for row-level type rules. + * @type string $dimension + * Required. The dimension a rule belongs to. Results are also aggregated at + * the dimension level. Supported dimensions are **["COMPLETENESS", + * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** + * @type float $threshold + * Optional. The minimum ratio of **passing_rows / total_rows** required to + * pass this rule, with a range of [0.0, 1.0]. + * 0 indicates default value (i.e. 1.0). + * This field is only valid for row-level type rules. + * @type string $name + * Optional. A mutable name for the rule. + * * The name must contain only letters (a-z, A-Z), numbers (0-9), or + * hyphens (-). + * * The maximum length is 63 characters. + * * Must start with a letter. + * * Must end with a number or a letter. + * @type string $description + * Optional. Description of the rule. + * * The maximum length is 1,024 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Row-level rule which evaluates whether each column value lies between a + * specified range. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation|null + */ + public function getRangeExpectation() + { + return $this->readOneof(1); + } + + public function hasRangeExpectation() + { + return $this->hasOneof(1); + } + + /** + * Row-level rule which evaluates whether each column value lies between a + * specified range. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation $var + * @return $this + */ + public function setRangeExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Row-level rule which evaluates whether each column value is null. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation|null + */ + public function getNonNullExpectation() + { + return $this->readOneof(2); + } + + public function hasNonNullExpectation() + { + return $this->hasOneof(2); + } + + /** + * Row-level rule which evaluates whether each column value is null. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation $var + * @return $this + */ + public function setNonNullExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Row-level rule which evaluates whether each column value is contained by + * a specified set. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation|null + */ + public function getSetExpectation() + { + return $this->readOneof(3); + } + + public function hasSetExpectation() + { + return $this->hasOneof(3); + } + + /** + * Row-level rule which evaluates whether each column value is contained by + * a specified set. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation $var + * @return $this + */ + public function setSetExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Row-level rule which evaluates whether each column value matches a + * specified regex. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation|null + */ + public function getRegexExpectation() + { + return $this->readOneof(4); + } + + public function hasRegexExpectation() + { + return $this->hasOneof(4); + } + + /** + * Row-level rule which evaluates whether each column value matches a + * specified regex. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation $var + * @return $this + */ + public function setRegexExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Row-level rule which evaluates whether each column value is unique. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation|null + */ + public function getUniquenessExpectation() + { + return $this->readOneof(100); + } + + public function hasUniquenessExpectation() + { + return $this->hasOneof(100); + } + + /** + * Row-level rule which evaluates whether each column value is unique. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation $var + * @return $this + */ + public function setUniquenessExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Aggregate rule which evaluates whether the column aggregate + * statistic lies between a specified range. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation|null + */ + public function getStatisticRangeExpectation() + { + return $this->readOneof(101); + } + + public function hasStatisticRangeExpectation() + { + return $this->hasOneof(101); + } + + /** + * Aggregate rule which evaluates whether the column aggregate + * statistic lies between a specified range. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation $var + * @return $this + */ + public function setStatisticRangeExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Row-level rule which evaluates whether each row in a table passes the + * specified condition. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation|null + */ + public function getRowConditionExpectation() + { + return $this->readOneof(200); + } + + public function hasRowConditionExpectation() + { + return $this->hasOneof(200); + } + + /** + * Row-level rule which evaluates whether each row in a table passes the + * specified condition. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation $var + * @return $this + */ + public function setRowConditionExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation::class); + $this->writeOneof(200, $var); + + return $this; + } + + /** + * Aggregate rule which evaluates whether the provided expression is true + * for a table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation|null + */ + public function getTableConditionExpectation() + { + return $this->readOneof(201); + } + + public function hasTableConditionExpectation() + { + return $this->hasOneof(201); + } + + /** + * Aggregate rule which evaluates whether the provided expression is true + * for a table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $var + * @return $this + */ + public function setTableConditionExpectation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation::class); + $this->writeOneof(201, $var); + + return $this; + } + + /** + * Optional. The unnested column which this rule is evaluated against. + * + * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Optional. The unnested column which this rule is evaluated against. + * + * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * Optional. Rows with `null` values will automatically fail a rule, unless + * `ignore_null` is `true`. In that case, such `null` rows are trivially + * considered passing. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreNull() + { + return $this->ignore_null; + } + + /** + * Optional. Rows with `null` values will automatically fail a rule, unless + * `ignore_null` is `true`. In that case, such `null` rows are trivially + * considered passing. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreNull($var) + { + GPBUtil::checkBool($var); + $this->ignore_null = $var; + + return $this; + } + + /** + * Required. The dimension a rule belongs to. Results are also aggregated at + * the dimension level. Supported dimensions are **["COMPLETENESS", + * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** + * + * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDimension() + { + return $this->dimension; + } + + /** + * Required. The dimension a rule belongs to. Results are also aggregated at + * the dimension level. Supported dimensions are **["COMPLETENESS", + * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** + * + * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkString($var, True); + $this->dimension = $var; + + return $this; + } + + /** + * Optional. The minimum ratio of **passing_rows / total_rows** required to + * pass this rule, with a range of [0.0, 1.0]. + * 0 indicates default value (i.e. 1.0). + * This field is only valid for row-level type rules. + * + * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getThreshold() + { + return $this->threshold; + } + + /** + * Optional. The minimum ratio of **passing_rows / total_rows** required to + * pass this rule, with a range of [0.0, 1.0]. + * 0 indicates default value (i.e. 1.0). + * This field is only valid for row-level type rules. + * + * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setThreshold($var) + { + GPBUtil::checkDouble($var); + $this->threshold = $var; + + return $this; + } + + /** + * Optional. A mutable name for the rule. + * * The name must contain only letters (a-z, A-Z), numbers (0-9), or + * hyphens (-). + * * The maximum length is 63 characters. + * * Must start with a letter. + * * Must end with a number or a letter. + * + * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. A mutable name for the rule. + * * The name must contain only letters (a-z, A-Z), numbers (0-9), or + * hyphens (-). + * * The maximum length is 63 characters. + * * Must start with a letter. + * * Must end with a number or a letter. + * + * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Description of the rule. + * * The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the rule. + * * The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 505 [(.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 getRuleType() + { + return $this->whichOneof("rule_type"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php new file mode 100644 index 000000000000..a3895598790a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php @@ -0,0 +1,36 @@ +google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + */ +class NonNullExpectation extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NonNullExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_NonNullExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php new file mode 100644 index 000000000000..f61b5edb63f3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php @@ -0,0 +1,204 @@ +google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + */ +class RangeExpectation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The minimum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * + * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_value = ''; + /** + * Optional. The maximum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * + * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_value = ''; + /** + * Optional. Whether each value needs to be strictly greater than ('>') the + * minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $strict_min_enabled = false; + /** + * Optional. Whether each value needs to be strictly lesser than ('<') the + * maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $strict_max_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $min_value + * Optional. The minimum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * @type string $max_value + * Optional. The maximum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * @type bool $strict_min_enabled + * Optional. Whether each value needs to be strictly greater than ('>') the + * minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * @type bool $strict_max_enabled + * Optional. Whether each value needs to be strictly lesser than ('<') the + * maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The minimum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * + * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMinValue() + { + return $this->min_value; + } + + /** + * Optional. The minimum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * + * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMinValue($var) + { + GPBUtil::checkString($var, True); + $this->min_value = $var; + + return $this; + } + + /** + * Optional. The maximum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * + * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMaxValue() + { + return $this->max_value; + } + + /** + * Optional. The maximum column value allowed for a row to pass this + * validation. At least one of `min_value` and `max_value` need to be + * provided. + * + * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMaxValue($var) + { + GPBUtil::checkString($var, True); + $this->max_value = $var; + + return $this; + } + + /** + * Optional. Whether each value needs to be strictly greater than ('>') the + * minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getStrictMinEnabled() + { + return $this->strict_min_enabled; + } + + /** + * Optional. Whether each value needs to be strictly greater than ('>') the + * minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setStrictMinEnabled($var) + { + GPBUtil::checkBool($var); + $this->strict_min_enabled = $var; + + return $this; + } + + /** + * Optional. Whether each value needs to be strictly lesser than ('<') the + * maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getStrictMaxEnabled() + { + return $this->strict_max_enabled; + } + + /** + * Optional. Whether each value needs to be strictly lesser than ('<') the + * maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setStrictMaxEnabled($var) + { + GPBUtil::checkBool($var); + $this->strict_max_enabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RangeExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RangeExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php new file mode 100644 index 000000000000..0c063eb2e522 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php @@ -0,0 +1,70 @@ +google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + */ +class RegexExpectation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A regular expression the column value is expected to match. + * + * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $regex = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $regex + * Optional. A regular expression the column value is expected to match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A regular expression the column value is expected to match. + * + * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRegex() + { + return $this->regex; + } + + /** + * Optional. A regular expression the column value is expected to match. + * + * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRegex($var) + { + GPBUtil::checkString($var, True); + $this->regex = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RegexExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RegexExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php new file mode 100644 index 000000000000..375eb693638f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php @@ -0,0 +1,73 @@ += 0 AND col2 < 10 + * + * Generated from protobuf message google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + */ +class RowConditionExpectation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The SQL expression. + * + * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sql_expression = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sql_expression + * Optional. The SQL expression. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The SQL expression. + * + * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSqlExpression() + { + return $this->sql_expression; + } + + /** + * Optional. The SQL expression. + * + * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSqlExpression($var) + { + GPBUtil::checkString($var, True); + $this->sql_expression = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RowConditionExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RowConditionExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php new file mode 100644 index 000000000000..2d2df81627f5 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php @@ -0,0 +1,70 @@ +google.cloud.dataplex.v1.DataQualityRule.SetExpectation + */ +class SetExpectation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Expected values for the column value. + * + * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * Optional. Expected values for the column value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Expected values for the column value. + * + * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Optional. Expected values for the column value. + * + * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SetExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_SetExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php new file mode 100644 index 000000000000..0712f1d292f8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php @@ -0,0 +1,239 @@ +google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + */ +class StatisticRangeExpectation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The aggregate metric to evaluate. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $statistic = 0; + /** + * Optional. The minimum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * + * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_value = ''; + /** + * Optional. The maximum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * + * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_value = ''; + /** + * Optional. Whether column statistic needs to be strictly greater than + * ('>') the minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $strict_min_enabled = false; + /** + * Optional. Whether column statistic needs to be strictly lesser than ('<') + * the maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $strict_max_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $statistic + * Optional. The aggregate metric to evaluate. + * @type string $min_value + * Optional. The minimum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * @type string $max_value + * Optional. The maximum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * @type bool $strict_min_enabled + * Optional. Whether column statistic needs to be strictly greater than + * ('>') the minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * @type bool $strict_max_enabled + * Optional. Whether column statistic needs to be strictly lesser than ('<') + * the maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The aggregate metric to evaluate. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getStatistic() + { + return $this->statistic; + } + + /** + * Optional. The aggregate metric to evaluate. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setStatistic($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation\ColumnStatistic::class); + $this->statistic = $var; + + return $this; + } + + /** + * Optional. The minimum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * + * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMinValue() + { + return $this->min_value; + } + + /** + * Optional. The minimum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * + * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMinValue($var) + { + GPBUtil::checkString($var, True); + $this->min_value = $var; + + return $this; + } + + /** + * Optional. The maximum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * + * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMaxValue() + { + return $this->max_value; + } + + /** + * Optional. The maximum column statistic value allowed for a row to pass + * this validation. + * At least one of `min_value` and `max_value` need to be provided. + * + * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMaxValue($var) + { + GPBUtil::checkString($var, True); + $this->max_value = $var; + + return $this; + } + + /** + * Optional. Whether column statistic needs to be strictly greater than + * ('>') the minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getStrictMinEnabled() + { + return $this->strict_min_enabled; + } + + /** + * Optional. Whether column statistic needs to be strictly greater than + * ('>') the minimum, or if equality is allowed. + * Only relevant if a `min_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setStrictMinEnabled($var) + { + GPBUtil::checkBool($var); + $this->strict_min_enabled = $var; + + return $this; + } + + /** + * Optional. Whether column statistic needs to be strictly lesser than ('<') + * the maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getStrictMaxEnabled() + { + return $this->strict_max_enabled; + } + + /** + * Optional. Whether column statistic needs to be strictly lesser than ('<') + * the maximum, or if equality is allowed. + * Only relevant if a `max_value` has been defined. Default = false. + * + * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setStrictMaxEnabled($var) + { + GPBUtil::checkBool($var); + $this->strict_max_enabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StatisticRangeExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_StatisticRangeExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php new file mode 100644 index 000000000000..6ae805f5de91 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php @@ -0,0 +1,71 @@ +google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic + */ +class ColumnStatistic +{ + /** + * Unspecified statistic type + * + * Generated from protobuf enum STATISTIC_UNDEFINED = 0; + */ + const STATISTIC_UNDEFINED = 0; + /** + * Evaluate the column mean + * + * Generated from protobuf enum MEAN = 1; + */ + const MEAN = 1; + /** + * Evaluate the column min + * + * Generated from protobuf enum MIN = 2; + */ + const MIN = 2; + /** + * Evaluate the column max + * + * Generated from protobuf enum MAX = 3; + */ + const MAX = 3; + + private static $valueToName = [ + self::STATISTIC_UNDEFINED => 'STATISTIC_UNDEFINED', + self::MEAN => 'MEAN', + self::MIN => 'MIN', + self::MAX => 'MAX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ColumnStatistic::class, \Google\Cloud\Dataplex\V1\DataQualityRule_StatisticRangeExpectation_ColumnStatistic::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php new file mode 100644 index 000000000000..e0c173a4c08b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php @@ -0,0 +1,73 @@ += 0 + * + * Generated from protobuf message google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + */ +class TableConditionExpectation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The SQL expression. + * + * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sql_expression = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sql_expression + * Optional. The SQL expression. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The SQL expression. + * + * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSqlExpression() + { + return $this->sql_expression; + } + + /** + * Optional. The SQL expression. + * + * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSqlExpression($var) + { + GPBUtil::checkString($var, True); + $this->sql_expression = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TableConditionExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_TableConditionExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php new file mode 100644 index 000000000000..b8303790ed89 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php @@ -0,0 +1,36 @@ +google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + */ +class UniquenessExpectation extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UniquenessExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_UniquenessExpectation::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php new file mode 100644 index 000000000000..729cc8beea99 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php @@ -0,0 +1,317 @@ +google.cloud.dataplex.v1.DataQualityRuleResult + */ +class DataQualityRuleResult extends \Google\Protobuf\Internal\Message +{ + /** + * The rule specified in the DataQualitySpec, as is. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; + */ + protected $rule = null; + /** + * Whether the rule passed or failed. + * + * Generated from protobuf field bool passed = 7; + */ + protected $passed = false; + /** + * The number of rows a rule was evaluated against. + * This field is only valid for row-level type rules. + * Evaluated count can be configured to either + * * include all rows (default) - with `null` rows automatically failing rule + * evaluation, or + * * exclude `null` rows from the `evaluated_count`, by setting + * `ignore_nulls = true`. + * + * Generated from protobuf field int64 evaluated_count = 9; + */ + protected $evaluated_count = 0; + /** + * The number of rows which passed a rule evaluation. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field int64 passed_count = 8; + */ + protected $passed_count = 0; + /** + * The number of rows with null values in the specified column. + * + * Generated from protobuf field int64 null_count = 5; + */ + protected $null_count = 0; + /** + * The ratio of **passed_count / evaluated_count**. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field double pass_ratio = 6; + */ + protected $pass_ratio = 0.0; + /** + * The query to find rows that did not pass this rule. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field string failing_rows_query = 10; + */ + protected $failing_rows_query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataQualityRule $rule + * The rule specified in the DataQualitySpec, as is. + * @type bool $passed + * Whether the rule passed or failed. + * @type int|string $evaluated_count + * The number of rows a rule was evaluated against. + * This field is only valid for row-level type rules. + * Evaluated count can be configured to either + * * include all rows (default) - with `null` rows automatically failing rule + * evaluation, or + * * exclude `null` rows from the `evaluated_count`, by setting + * `ignore_nulls = true`. + * @type int|string $passed_count + * The number of rows which passed a rule evaluation. + * This field is only valid for row-level type rules. + * @type int|string $null_count + * The number of rows with null values in the specified column. + * @type float $pass_ratio + * The ratio of **passed_count / evaluated_count**. + * This field is only valid for row-level type rules. + * @type string $failing_rows_query + * The query to find rows that did not pass this rule. + * This field is only valid for row-level type rules. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * The rule specified in the DataQualitySpec, as is. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule|null + */ + public function getRule() + { + return $this->rule; + } + + public function hasRule() + { + return isset($this->rule); + } + + public function clearRule() + { + unset($this->rule); + } + + /** + * The rule specified in the DataQualitySpec, as is. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule $var + * @return $this + */ + public function setRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule::class); + $this->rule = $var; + + return $this; + } + + /** + * Whether the rule passed or failed. + * + * Generated from protobuf field bool passed = 7; + * @return bool + */ + public function getPassed() + { + return $this->passed; + } + + /** + * Whether the rule passed or failed. + * + * Generated from protobuf field bool passed = 7; + * @param bool $var + * @return $this + */ + public function setPassed($var) + { + GPBUtil::checkBool($var); + $this->passed = $var; + + return $this; + } + + /** + * The number of rows a rule was evaluated against. + * This field is only valid for row-level type rules. + * Evaluated count can be configured to either + * * include all rows (default) - with `null` rows automatically failing rule + * evaluation, or + * * exclude `null` rows from the `evaluated_count`, by setting + * `ignore_nulls = true`. + * + * Generated from protobuf field int64 evaluated_count = 9; + * @return int|string + */ + public function getEvaluatedCount() + { + return $this->evaluated_count; + } + + /** + * The number of rows a rule was evaluated against. + * This field is only valid for row-level type rules. + * Evaluated count can be configured to either + * * include all rows (default) - with `null` rows automatically failing rule + * evaluation, or + * * exclude `null` rows from the `evaluated_count`, by setting + * `ignore_nulls = true`. + * + * Generated from protobuf field int64 evaluated_count = 9; + * @param int|string $var + * @return $this + */ + public function setEvaluatedCount($var) + { + GPBUtil::checkInt64($var); + $this->evaluated_count = $var; + + return $this; + } + + /** + * The number of rows which passed a rule evaluation. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field int64 passed_count = 8; + * @return int|string + */ + public function getPassedCount() + { + return $this->passed_count; + } + + /** + * The number of rows which passed a rule evaluation. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field int64 passed_count = 8; + * @param int|string $var + * @return $this + */ + public function setPassedCount($var) + { + GPBUtil::checkInt64($var); + $this->passed_count = $var; + + return $this; + } + + /** + * The number of rows with null values in the specified column. + * + * Generated from protobuf field int64 null_count = 5; + * @return int|string + */ + public function getNullCount() + { + return $this->null_count; + } + + /** + * The number of rows with null values in the specified column. + * + * Generated from protobuf field int64 null_count = 5; + * @param int|string $var + * @return $this + */ + public function setNullCount($var) + { + GPBUtil::checkInt64($var); + $this->null_count = $var; + + return $this; + } + + /** + * The ratio of **passed_count / evaluated_count**. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field double pass_ratio = 6; + * @return float + */ + public function getPassRatio() + { + return $this->pass_ratio; + } + + /** + * The ratio of **passed_count / evaluated_count**. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field double pass_ratio = 6; + * @param float $var + * @return $this + */ + public function setPassRatio($var) + { + GPBUtil::checkDouble($var); + $this->pass_ratio = $var; + + return $this; + } + + /** + * The query to find rows that did not pass this rule. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field string failing_rows_query = 10; + * @return string + */ + public function getFailingRowsQuery() + { + return $this->failing_rows_query; + } + + /** + * The query to find rows that did not pass this rule. + * This field is only valid for row-level type rules. + * + * Generated from protobuf field string failing_rows_query = 10; + * @param string $var + * @return $this + */ + public function setFailingRowsQuery($var) + { + GPBUtil::checkString($var, True); + $this->failing_rows_query = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php new file mode 100644 index 000000000000..bf525a9a7dd1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php @@ -0,0 +1,450 @@ +google.cloud.dataplex.v1.DataQualityScanRuleResult + */ +class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier of the specific data scan job this log entry is for. + * + * Generated from protobuf field string job_id = 1; + */ + protected $job_id = ''; + /** + * The data source of the data scan (e.g. BigQuery table name). + * + * Generated from protobuf field string data_source = 2; + */ + protected $data_source = ''; + /** + * The column which this rule is evaluated against. + * + * Generated from protobuf field string column = 3; + */ + protected $column = ''; + /** + * The name of the data quality rule. + * + * Generated from protobuf field string rule_name = 4; + */ + protected $rule_name = ''; + /** + * The type of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + */ + protected $rule_type = 0; + /** + * The evaluation type of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + */ + protected $evalution_type = 0; + /** + * The dimension of the data quality rule. + * + * Generated from protobuf field string rule_dimension = 7; + */ + protected $rule_dimension = ''; + /** + * The passing threshold ([0.0, 100.0]) of the data quality rule. + * + * Generated from protobuf field double threshold_percent = 8; + */ + protected $threshold_percent = 0.0; + /** + * The result of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + */ + protected $result = 0; + /** + * The number of rows evaluated against the data quality rule. + * This field is only valid for rules of PER_ROW evaluation type. + * + * Generated from protobuf field int64 evaluated_row_count = 10; + */ + protected $evaluated_row_count = 0; + /** + * The number of rows which passed a rule evaluation. + * This field is only valid for rules of PER_ROW evaluation type. + * + * Generated from protobuf field int64 passed_row_count = 11; + */ + protected $passed_row_count = 0; + /** + * The number of rows with null values in the specified column. + * + * Generated from protobuf field int64 null_row_count = 12; + */ + protected $null_row_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $job_id + * Identifier of the specific data scan job this log entry is for. + * @type string $data_source + * The data source of the data scan (e.g. BigQuery table name). + * @type string $column + * The column which this rule is evaluated against. + * @type string $rule_name + * The name of the data quality rule. + * @type int $rule_type + * The type of the data quality rule. + * @type int $evalution_type + * The evaluation type of the data quality rule. + * @type string $rule_dimension + * The dimension of the data quality rule. + * @type float $threshold_percent + * The passing threshold ([0.0, 100.0]) of the data quality rule. + * @type int $result + * The result of the data quality rule. + * @type int|string $evaluated_row_count + * The number of rows evaluated against the data quality rule. + * This field is only valid for rules of PER_ROW evaluation type. + * @type int|string $passed_row_count + * The number of rows which passed a rule evaluation. + * This field is only valid for rules of PER_ROW evaluation type. + * @type int|string $null_row_count + * The number of rows with null values in the specified column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * Identifier of the specific data scan job this log entry is for. + * + * Generated from protobuf field string job_id = 1; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * Identifier of the specific data scan job this log entry is for. + * + * Generated from protobuf field string job_id = 1; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * The data source of the data scan (e.g. BigQuery table name). + * + * Generated from protobuf field string data_source = 2; + * @return string + */ + public function getDataSource() + { + return $this->data_source; + } + + /** + * The data source of the data scan (e.g. BigQuery table name). + * + * Generated from protobuf field string data_source = 2; + * @param string $var + * @return $this + */ + public function setDataSource($var) + { + GPBUtil::checkString($var, True); + $this->data_source = $var; + + return $this; + } + + /** + * The column which this rule is evaluated against. + * + * Generated from protobuf field string column = 3; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * The column which this rule is evaluated against. + * + * Generated from protobuf field string column = 3; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * The name of the data quality rule. + * + * Generated from protobuf field string rule_name = 4; + * @return string + */ + public function getRuleName() + { + return $this->rule_name; + } + + /** + * The name of the data quality rule. + * + * Generated from protobuf field string rule_name = 4; + * @param string $var + * @return $this + */ + public function setRuleName($var) + { + GPBUtil::checkString($var, True); + $this->rule_name = $var; + + return $this; + } + + /** + * The type of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * @return int + */ + public function getRuleType() + { + return $this->rule_type; + } + + /** + * The type of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * @param int $var + * @return $this + */ + public function setRuleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\RuleType::class); + $this->rule_type = $var; + + return $this; + } + + /** + * The evaluation type of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * @return int + */ + public function getEvalutionType() + { + return $this->evalution_type; + } + + /** + * The evaluation type of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * @param int $var + * @return $this + */ + public function setEvalutionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\EvaluationType::class); + $this->evalution_type = $var; + + return $this; + } + + /** + * The dimension of the data quality rule. + * + * Generated from protobuf field string rule_dimension = 7; + * @return string + */ + public function getRuleDimension() + { + return $this->rule_dimension; + } + + /** + * The dimension of the data quality rule. + * + * Generated from protobuf field string rule_dimension = 7; + * @param string $var + * @return $this + */ + public function setRuleDimension($var) + { + GPBUtil::checkString($var, True); + $this->rule_dimension = $var; + + return $this; + } + + /** + * The passing threshold ([0.0, 100.0]) of the data quality rule. + * + * Generated from protobuf field double threshold_percent = 8; + * @return float + */ + public function getThresholdPercent() + { + return $this->threshold_percent; + } + + /** + * The passing threshold ([0.0, 100.0]) of the data quality rule. + * + * Generated from protobuf field double threshold_percent = 8; + * @param float $var + * @return $this + */ + public function setThresholdPercent($var) + { + GPBUtil::checkDouble($var); + $this->threshold_percent = $var; + + return $this; + } + + /** + * The result of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * @return int + */ + public function getResult() + { + return $this->result; + } + + /** + * The result of the data quality rule. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * @param int $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\Result::class); + $this->result = $var; + + return $this; + } + + /** + * The number of rows evaluated against the data quality rule. + * This field is only valid for rules of PER_ROW evaluation type. + * + * Generated from protobuf field int64 evaluated_row_count = 10; + * @return int|string + */ + public function getEvaluatedRowCount() + { + return $this->evaluated_row_count; + } + + /** + * The number of rows evaluated against the data quality rule. + * This field is only valid for rules of PER_ROW evaluation type. + * + * Generated from protobuf field int64 evaluated_row_count = 10; + * @param int|string $var + * @return $this + */ + public function setEvaluatedRowCount($var) + { + GPBUtil::checkInt64($var); + $this->evaluated_row_count = $var; + + return $this; + } + + /** + * The number of rows which passed a rule evaluation. + * This field is only valid for rules of PER_ROW evaluation type. + * + * Generated from protobuf field int64 passed_row_count = 11; + * @return int|string + */ + public function getPassedRowCount() + { + return $this->passed_row_count; + } + + /** + * The number of rows which passed a rule evaluation. + * This field is only valid for rules of PER_ROW evaluation type. + * + * Generated from protobuf field int64 passed_row_count = 11; + * @param int|string $var + * @return $this + */ + public function setPassedRowCount($var) + { + GPBUtil::checkInt64($var); + $this->passed_row_count = $var; + + return $this; + } + + /** + * The number of rows with null values in the specified column. + * + * Generated from protobuf field int64 null_row_count = 12; + * @return int|string + */ + public function getNullRowCount() + { + return $this->null_row_count; + } + + /** + * The number of rows with null values in the specified column. + * + * Generated from protobuf field int64 null_row_count = 12; + * @param int|string $var + * @return $this + */ + public function setNullRowCount($var) + { + GPBUtil::checkInt64($var); + $this->null_row_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php new file mode 100644 index 000000000000..c683c18ffa95 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType + */ +class EvaluationType +{ + /** + * An unspecified evaluation type. + * + * Generated from protobuf enum EVALUATION_TYPE_UNSPECIFIED = 0; + */ + const EVALUATION_TYPE_UNSPECIFIED = 0; + /** + * The rule evaluation is done at per row level. + * + * Generated from protobuf enum PER_ROW = 1; + */ + const PER_ROW = 1; + /** + * The rule evaluation is done for an aggregate of rows. + * + * Generated from protobuf enum AGGREGATE = 2; + */ + const AGGREGATE = 2; + + private static $valueToName = [ + self::EVALUATION_TYPE_UNSPECIFIED => 'EVALUATION_TYPE_UNSPECIFIED', + self::PER_ROW => 'PER_ROW', + self::AGGREGATE => 'AGGREGATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EvaluationType::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_EvaluationType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php new file mode 100644 index 000000000000..6fc620d48942 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.DataQualityScanRuleResult.Result + */ +class Result +{ + /** + * An unspecified result. + * + * Generated from protobuf enum RESULT_UNSPECIFIED = 0; + */ + const RESULT_UNSPECIFIED = 0; + /** + * The data quality rule passed. + * + * Generated from protobuf enum PASSED = 1; + */ + const PASSED = 1; + /** + * The data quality rule failed. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + + private static $valueToName = [ + self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', + self::PASSED => 'PASSED', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Result::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_Result::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php new file mode 100644 index 000000000000..081cfa427aa6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php @@ -0,0 +1,114 @@ +google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType + */ +class RuleType +{ + /** + * An unspecified rule type. + * + * Generated from protobuf enum RULE_TYPE_UNSPECIFIED = 0; + */ + const RULE_TYPE_UNSPECIFIED = 0; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. + * + * Generated from protobuf enum NON_NULL_EXPECTATION = 1; + */ + const NON_NULL_EXPECTATION = 1; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. + * + * Generated from protobuf enum RANGE_EXPECTATION = 2; + */ + const RANGE_EXPECTATION = 2; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. + * + * Generated from protobuf enum REGEX_EXPECTATION = 3; + */ + const REGEX_EXPECTATION = 3; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. + * + * Generated from protobuf enum ROW_CONDITION_EXPECTATION = 4; + */ + const ROW_CONDITION_EXPECTATION = 4; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. + * + * Generated from protobuf enum SET_EXPECTATION = 5; + */ + const SET_EXPECTATION = 5; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. + * + * Generated from protobuf enum STATISTIC_RANGE_EXPECTATION = 6; + */ + const STATISTIC_RANGE_EXPECTATION = 6; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. + * + * Generated from protobuf enum TABLE_CONDITION_EXPECTATION = 7; + */ + const TABLE_CONDITION_EXPECTATION = 7; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. + * + * Generated from protobuf enum UNIQUENESS_EXPECTATION = 8; + */ + const UNIQUENESS_EXPECTATION = 8; + + private static $valueToName = [ + self::RULE_TYPE_UNSPECIFIED => 'RULE_TYPE_UNSPECIFIED', + self::NON_NULL_EXPECTATION => 'NON_NULL_EXPECTATION', + self::RANGE_EXPECTATION => 'RANGE_EXPECTATION', + self::REGEX_EXPECTATION => 'REGEX_EXPECTATION', + self::ROW_CONDITION_EXPECTATION => 'ROW_CONDITION_EXPECTATION', + self::SET_EXPECTATION => 'SET_EXPECTATION', + self::STATISTIC_RANGE_EXPECTATION => 'STATISTIC_RANGE_EXPECTATION', + self::TABLE_CONDITION_EXPECTATION => 'TABLE_CONDITION_EXPECTATION', + self::UNIQUENESS_EXPECTATION => 'UNIQUENESS_EXPECTATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RuleType::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_RuleType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php new file mode 100644 index 000000000000..45b23f54b8df --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php @@ -0,0 +1,215 @@ +google.cloud.dataplex.v1.DataQualitySpec + */ +class DataQualitySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of rules to evaluate against a data source. At least one + * rule is required. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + /** + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * + * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sampling_percent = 0.0; + /** + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * + * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $row_filter = ''; + /** + * Optional. Actions to take upon job completion. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $post_scan_actions = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. The list of rules to evaluate against a data source. At least one + * rule is required. + * @type float $sampling_percent + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * @type string $row_filter + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions $post_scan_actions + * Optional. Actions to take upon job completion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of rules to evaluate against a data source. At least one + * rule is required. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. The list of rules to evaluate against a data source. At least one + * rule is required. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRule::class); + $this->rules = $arr; + + return $this; + } + + /** + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * + * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getSamplingPercent() + { + return $this->sampling_percent; + } + + /** + * Optional. The percentage of the records to be selected from the dataset for + * DataScan. + * * Value can range between 0.0 and 100.0 with up to 3 significant decimal + * digits. + * * Sampling is not applied if `sampling_percent` is not specified, 0 or + * 100. + * + * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setSamplingPercent($var) + { + GPBUtil::checkFloat($var); + $this->sampling_percent = $var; + + return $this; + } + + /** + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * + * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRowFilter() + { + return $this->row_filter; + } + + /** + * Optional. A filter applied to all rows in a single DataScan job. + * The filter needs to be a valid SQL expression for a WHERE clause in + * BigQuery standard SQL syntax. + * Example: col1 >= 0 AND col2 < 10 + * + * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRowFilter($var) + { + GPBUtil::checkString($var, True); + $this->row_filter = $var; + + return $this; + } + + /** + * Optional. Actions to take upon job completion. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions|null + */ + public function getPostScanActions() + { + return $this->post_scan_actions; + } + + public function hasPostScanActions() + { + return isset($this->post_scan_actions); + } + + public function clearPostScanActions() + { + unset($this->post_scan_actions); + } + + /** + * Optional. Actions to take upon job completion. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions $var + * @return $this + */ + public function setPostScanActions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions::class); + $this->post_scan_actions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php new file mode 100644 index 000000000000..f70189d4156a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php @@ -0,0 +1,84 @@ +google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + */ +class PostScanActions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If set, results will be exported to the provided BigQuery + * table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $bigquery_export = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport $bigquery_export + * Optional. If set, results will be exported to the provided BigQuery + * table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If set, results will be exported to the provided BigQuery + * table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport|null + */ + public function getBigqueryExport() + { + return $this->bigquery_export; + } + + public function hasBigqueryExport() + { + return isset($this->bigquery_export); + } + + public function clearBigqueryExport() + { + unset($this->bigquery_export); + } + + /** + * Optional. If set, results will be exported to the provided BigQuery + * table. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport $var + * @return $this + */ + public function setBigqueryExport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport::class); + $this->bigquery_export = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostScanActions::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php new file mode 100644 index 000000000000..737ddd0e4ff8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php @@ -0,0 +1,78 @@ +google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + */ +class BigQueryExport extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The BigQuery table to export DataQualityScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $results_table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $results_table + * Optional. The BigQuery table to export DataQualityScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The BigQuery table to export DataQualityScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getResultsTable() + { + return $this->results_table; + } + + /** + * Optional. The BigQuery table to export DataQualityScan results to. + * Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setResultsTable($var) + { + GPBUtil::checkString($var, True); + $this->results_table = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryExport::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_BigQueryExport::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php new file mode 100644 index 000000000000..8f54f065081e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php @@ -0,0 +1,676 @@ +google.cloud.dataplex.v1.DataScan + */ +class DataScan extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the scan, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the scan. This ID will + * be different if the scan is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Optional. Description of the scan. + * * Must be between 1-1024 characters. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. User friendly display name. + * * Must be between 1-256 characters. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. User-defined labels for the scan. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Current state of the DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time when the scan was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the scan was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. The data source for DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data = null; + /** + * Optional. DataScan execution settings. + * If not specified, the fields in it will use their default values. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $execution_spec = null; + /** + * Output only. Status of the data scan execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $execution_status = null; + /** + * Output only. The type of DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + protected $spec; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the scan, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @type string $uid + * Output only. System generated globally unique ID for the scan. This ID will + * be different if the scan is deleted and re-created with the same name. + * @type string $description + * Optional. Description of the scan. + * * Must be between 1-1024 characters. + * @type string $display_name + * Optional. User friendly display name. + * * Must be between 1-256 characters. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for the scan. + * @type int $state + * Output only. Current state of the DataScan. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the scan was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the scan was last updated. + * @type \Google\Cloud\Dataplex\V1\DataSource $data + * Required. The data source for DataScan. + * @type \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec $execution_spec + * Optional. DataScan execution settings. + * If not specified, the fields in it will use their default values. + * @type \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus $execution_status + * Output only. Status of the data scan execution. + * @type int $type + * Output only. The type of DataScan. + * @type \Google\Cloud\Dataplex\V1\DataQualitySpec $data_quality_spec + * DataQualityScan related setting. + * @type \Google\Cloud\Dataplex\V1\DataProfileSpec $data_profile_spec + * DataProfileScan related setting. + * @type \Google\Cloud\Dataplex\V1\DataQualityResult $data_quality_result + * Output only. The result of the data quality scan. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult $data_profile_result + * Output only. The result of the data profile scan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the scan, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the scan, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the scan. This ID will + * be different if the scan is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the scan. This ID will + * be different if the scan is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Optional. Description of the scan. + * * Must be between 1-1024 characters. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the scan. + * * Must be between 1-1024 characters. + * + * 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. User friendly display name. + * * Must be between 1-256 characters. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * * Must be between 1-256 characters. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. User-defined labels for the scan. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for the scan. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Current state of the DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time when the scan was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 when the scan was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 when the scan was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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 when the scan was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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; + } + + /** + * Required. The data source for DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataSource|null + */ + public function getData() + { + return $this->data; + } + + public function hasData() + { + return isset($this->data); + } + + public function clearData() + { + unset($this->data); + } + + /** + * Required. The data source for DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataSource $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataSource::class); + $this->data = $var; + + return $this; + } + + /** + * Optional. DataScan execution settings. + * If not specified, the fields in it will use their default values. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec|null + */ + public function getExecutionSpec() + { + return $this->execution_spec; + } + + public function hasExecutionSpec() + { + return isset($this->execution_spec); + } + + public function clearExecutionSpec() + { + unset($this->execution_spec); + } + + /** + * Optional. DataScan execution settings. + * If not specified, the fields in it will use their default values. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec $var + * @return $this + */ + public function setExecutionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec::class); + $this->execution_spec = $var; + + return $this; + } + + /** + * Output only. Status of the data scan execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus|null + */ + public function getExecutionStatus() + { + return $this->execution_status; + } + + public function hasExecutionStatus() + { + return isset($this->execution_status); + } + + public function clearExecutionStatus() + { + unset($this->execution_status); + } + + /** + * Output only. Status of the data scan execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus $var + * @return $this + */ + public function setExecutionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus::class); + $this->execution_status = $var; + + return $this; + } + + /** + * Output only. The type of DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanType::class); + $this->type = $var; + + return $this; + } + + /** + * DataQualityScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100; + * @return \Google\Cloud\Dataplex\V1\DataQualitySpec|null + */ + public function getDataQualitySpec() + { + return $this->readOneof(100); + } + + public function hasDataQualitySpec() + { + return $this->hasOneof(100); + } + + /** + * DataQualityScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100; + * @param \Google\Cloud\Dataplex\V1\DataQualitySpec $var + * @return $this + */ + public function setDataQualitySpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * DataProfileScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101; + * @return \Google\Cloud\Dataplex\V1\DataProfileSpec|null + */ + public function getDataProfileSpec() + { + return $this->readOneof(101); + } + + public function hasDataProfileSpec() + { + return $this->hasOneof(101); + } + + /** + * DataProfileScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101; + * @param \Google\Cloud\Dataplex\V1\DataProfileSpec $var + * @return $this + */ + public function setDataProfileSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Output only. The result of the data quality scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataQualityResult|null + */ + public function getDataQualityResult() + { + return $this->readOneof(200); + } + + public function hasDataQualityResult() + { + return $this->hasOneof(200); + } + + /** + * Output only. The result of the data quality scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataQualityResult $var + * @return $this + */ + public function setDataQualityResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult::class); + $this->writeOneof(200, $var); + + return $this; + } + + /** + * Output only. The result of the data profile scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult|null + */ + public function getDataProfileResult() + { + return $this->readOneof(201); + } + + public function hasDataProfileResult() + { + return $this->hasOneof(201); + } + + /** + * Output only. The result of the data profile scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult $var + * @return $this + */ + public function setDataProfileResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult::class); + $this->writeOneof(201, $var); + + return $this; + } + + /** + * @return string + */ + public function getSpec() + { + return $this->whichOneof("spec"); + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php new file mode 100644 index 000000000000..553204435b15 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php @@ -0,0 +1,136 @@ +google.cloud.dataplex.v1.DataScan.ExecutionSpec + */ +class ExecutionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Spec related to how often and when a scan should be triggered. + * If not specified, the default is `OnDemand`, which means the scan will + * not run until the user calls `RunDataScan` API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $trigger = null; + protected $incremental; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\Trigger $trigger + * Optional. Spec related to how often and when a scan should be triggered. + * If not specified, the default is `OnDemand`, which means the scan will + * not run until the user calls `RunDataScan` API. + * @type string $field + * Immutable. The unnested field (of type *Date* or *Timestamp*) that + * contains values which monotonically increase over time. + * If not specified, a data scan will run for all data in the table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Spec related to how often and when a scan should be triggered. + * If not specified, the default is `OnDemand`, which means the scan will + * not run until the user calls `RunDataScan` API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Trigger|null + */ + public function getTrigger() + { + return $this->trigger; + } + + public function hasTrigger() + { + return isset($this->trigger); + } + + public function clearTrigger() + { + unset($this->trigger); + } + + /** + * Optional. Spec related to how often and when a scan should be triggered. + * If not specified, the default is `OnDemand`, which means the scan will + * not run until the user calls `RunDataScan` API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Trigger $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * Immutable. The unnested field (of type *Date* or *Timestamp*) that + * contains values which monotonically increase over time. + * If not specified, a data scan will run for all data in the table. + * + * Generated from protobuf field string field = 100 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getField() + { + return $this->readOneof(100); + } + + public function hasField() + { + return $this->hasOneof(100); + } + + /** + * Immutable. The unnested field (of type *Date* or *Timestamp*) that + * contains values which monotonically increase over time. + * If not specified, a data scan will run for all data in the table. + * + * Generated from protobuf field string field = 100 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * @return string + */ + public function getIncremental() + { + return $this->whichOneof("incremental"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionSpec::class, \Google\Cloud\Dataplex\V1\DataScan_ExecutionSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php new file mode 100644 index 000000000000..f9f827047242 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php @@ -0,0 +1,124 @@ +google.cloud.dataplex.v1.DataScan.ExecutionStatus + */ +class ExecutionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The time when the latest DataScanJob started. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; + */ + protected $latest_job_start_time = null; + /** + * The time when the latest DataScanJob ended. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; + */ + protected $latest_job_end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $latest_job_start_time + * The time when the latest DataScanJob started. + * @type \Google\Protobuf\Timestamp $latest_job_end_time + * The time when the latest DataScanJob ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * The time when the latest DataScanJob started. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestJobStartTime() + { + return $this->latest_job_start_time; + } + + public function hasLatestJobStartTime() + { + return isset($this->latest_job_start_time); + } + + public function clearLatestJobStartTime() + { + unset($this->latest_job_start_time); + } + + /** + * The time when the latest DataScanJob started. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestJobStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_job_start_time = $var; + + return $this; + } + + /** + * The time when the latest DataScanJob ended. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestJobEndTime() + { + return $this->latest_job_end_time; + } + + public function hasLatestJobEndTime() + { + return isset($this->latest_job_end_time); + } + + public function clearLatestJobEndTime() + { + unset($this->latest_job_end_time); + } + + /** + * The time when the latest DataScanJob ended. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestJobEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_job_end_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionStatus::class, \Google\Cloud\Dataplex\V1\DataScan_ExecutionStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php new file mode 100644 index 000000000000..d4263d16f7ac --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php @@ -0,0 +1,633 @@ +google.cloud.dataplex.v1.DataScanEvent + */ +class DataScanEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The data source of the data scan + * + * Generated from protobuf field string data_source = 1; + */ + protected $data_source = ''; + /** + * The identifier of the specific data scan job this log entry is for. + * + * Generated from protobuf field string job_id = 2; + */ + protected $job_id = ''; + /** + * The time when the data scan job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; + */ + protected $create_time = null; + /** + * The time when the data scan job started to run. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * The time when the data scan job finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + */ + protected $end_time = null; + /** + * The type of the data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + */ + protected $type = 0; + /** + * The status of the data scan job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; + */ + protected $state = 0; + /** + * The message describing the data scan job event. + * + * Generated from protobuf field string message = 7; + */ + protected $message = ''; + /** + * A version identifier of the spec which was used to execute this job. + * + * Generated from protobuf field string spec_version = 8; + */ + protected $spec_version = ''; + /** + * The trigger type of the data scan job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + */ + protected $trigger = 0; + /** + * The scope of the data scan (e.g. full, incremental). + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; + */ + protected $scope = 0; + /** + * The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + */ + protected $post_scan_actions_result = null; + protected $result; + protected $appliedConfigs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data_source + * The data source of the data scan + * @type string $job_id + * The identifier of the specific data scan job this log entry is for. + * @type \Google\Protobuf\Timestamp $create_time + * The time when the data scan job was created. + * @type \Google\Protobuf\Timestamp $start_time + * The time when the data scan job started to run. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the data scan job finished. + * @type int $type + * The type of the data scan. + * @type int $state + * The status of the data scan job. + * @type string $message + * The message describing the data scan job event. + * @type string $spec_version + * A version identifier of the spec which was used to execute this job. + * @type int $trigger + * The trigger type of the data scan job. + * @type int $scope + * The scope of the data scan (e.g. full, incremental). + * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult $data_profile + * Data profile result for data profile type data scan. + * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult $data_quality + * Data quality result for data quality type data scan. + * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs $data_profile_configs + * Applied configs for data profile type data scan. + * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs $data_quality_configs + * Applied configs for data quality type data scan. + * @type \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult $post_scan_actions_result + * The result of post scan actions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The data source of the data scan + * + * Generated from protobuf field string data_source = 1; + * @return string + */ + public function getDataSource() + { + return $this->data_source; + } + + /** + * The data source of the data scan + * + * Generated from protobuf field string data_source = 1; + * @param string $var + * @return $this + */ + public function setDataSource($var) + { + GPBUtil::checkString($var, True); + $this->data_source = $var; + + return $this; + } + + /** + * The identifier of the specific data scan job this log entry is for. + * + * Generated from protobuf field string job_id = 2; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * The identifier of the specific data scan job this log entry is for. + * + * Generated from protobuf field string job_id = 2; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * The time when the data scan job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; + * @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); + } + + /** + * The time when the data scan job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time when the data scan job started to run. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time when the data scan job started to run. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time when the data scan job finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time when the data scan job finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The type of the data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\ScanType::class); + $this->type = $var; + + return $this; + } + + /** + * The status of the data scan job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The status of the data scan job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\State::class); + $this->state = $var; + + return $this; + } + + /** + * The message describing the data scan job event. + * + * Generated from protobuf field string message = 7; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The message describing the data scan job event. + * + * Generated from protobuf field string message = 7; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * A version identifier of the spec which was used to execute this job. + * + * Generated from protobuf field string spec_version = 8; + * @return string + */ + public function getSpecVersion() + { + return $this->spec_version; + } + + /** + * A version identifier of the spec which was used to execute this job. + * + * Generated from protobuf field string spec_version = 8; + * @param string $var + * @return $this + */ + public function setSpecVersion($var) + { + GPBUtil::checkString($var, True); + $this->spec_version = $var; + + return $this; + } + + /** + * The trigger type of the data scan job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * @return int + */ + public function getTrigger() + { + return $this->trigger; + } + + /** + * The trigger type of the data scan job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * @param int $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * The scope of the data scan (e.g. full, incremental). + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * The scope of the data scan (e.g. full, incremental). + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * Data profile result for data profile type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult|null + */ + public function getDataProfile() + { + return $this->readOneof(101); + } + + public function hasDataProfile() + { + return $this->hasOneof(101); + } + + /** + * Data profile result for data profile type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult $var + * @return $this + */ + public function setDataProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Data quality result for data quality type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult|null + */ + public function getDataQuality() + { + return $this->readOneof(102); + } + + public function hasDataQuality() + { + return $this->hasOneof(102); + } + + /** + * Data quality result for data quality type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult $var + * @return $this + */ + public function setDataQuality($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Applied configs for data profile type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs|null + */ + public function getDataProfileConfigs() + { + return $this->readOneof(201); + } + + public function hasDataProfileConfigs() + { + return $this->hasOneof(201); + } + + /** + * Applied configs for data profile type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs $var + * @return $this + */ + public function setDataProfileConfigs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs::class); + $this->writeOneof(201, $var); + + return $this; + } + + /** + * Applied configs for data quality type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs|null + */ + public function getDataQualityConfigs() + { + return $this->readOneof(202); + } + + public function hasDataQualityConfigs() + { + return $this->hasOneof(202); + } + + /** + * Applied configs for data quality type data scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs $var + * @return $this + */ + public function setDataQualityConfigs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs::class); + $this->writeOneof(202, $var); + + return $this; + } + + /** + * The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * @return \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult|null + */ + public function getPostScanActionsResult() + { + return $this->post_scan_actions_result; + } + + public function hasPostScanActionsResult() + { + return isset($this->post_scan_actions_result); + } + + public function clearPostScanActionsResult() + { + unset($this->post_scan_actions_result); + } + + /** + * The result of post scan actions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * @param \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult $var + * @return $this + */ + public function setPostScanActionsResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult::class); + $this->post_scan_actions_result = $var; + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + + /** + * @return string + */ + public function getAppliedConfigs() + { + return $this->whichOneof("appliedConfigs"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php new file mode 100644 index 000000000000..61dcc852f43c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php @@ -0,0 +1,150 @@ +google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + */ +class DataProfileAppliedConfigs extends \Google\Protobuf\Internal\Message +{ + /** + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * + * Generated from protobuf field float sampling_percent = 1; + */ + protected $sampling_percent = 0.0; + /** + * Boolean indicating whether a row filter was applied in the DataScan job. + * + * Generated from protobuf field bool row_filter_applied = 2; + */ + protected $row_filter_applied = false; + /** + * Boolean indicating whether a column filter was applied in the DataScan + * job. + * + * Generated from protobuf field bool column_filter_applied = 3; + */ + protected $column_filter_applied = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $sampling_percent + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * @type bool $row_filter_applied + * Boolean indicating whether a row filter was applied in the DataScan job. + * @type bool $column_filter_applied + * Boolean indicating whether a column filter was applied in the DataScan + * job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * + * Generated from protobuf field float sampling_percent = 1; + * @return float + */ + public function getSamplingPercent() + { + return $this->sampling_percent; + } + + /** + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * + * Generated from protobuf field float sampling_percent = 1; + * @param float $var + * @return $this + */ + public function setSamplingPercent($var) + { + GPBUtil::checkFloat($var); + $this->sampling_percent = $var; + + return $this; + } + + /** + * Boolean indicating whether a row filter was applied in the DataScan job. + * + * Generated from protobuf field bool row_filter_applied = 2; + * @return bool + */ + public function getRowFilterApplied() + { + return $this->row_filter_applied; + } + + /** + * Boolean indicating whether a row filter was applied in the DataScan job. + * + * Generated from protobuf field bool row_filter_applied = 2; + * @param bool $var + * @return $this + */ + public function setRowFilterApplied($var) + { + GPBUtil::checkBool($var); + $this->row_filter_applied = $var; + + return $this; + } + + /** + * Boolean indicating whether a column filter was applied in the DataScan + * job. + * + * Generated from protobuf field bool column_filter_applied = 3; + * @return bool + */ + public function getColumnFilterApplied() + { + return $this->column_filter_applied; + } + + /** + * Boolean indicating whether a column filter was applied in the DataScan + * job. + * + * Generated from protobuf field bool column_filter_applied = 3; + * @param bool $var + * @return $this + */ + public function setColumnFilterApplied($var) + { + GPBUtil::checkBool($var); + $this->column_filter_applied = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataProfileAppliedConfigs::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataProfileAppliedConfigs::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php new file mode 100644 index 000000000000..90adffac7a98 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php @@ -0,0 +1,70 @@ +google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + */ +class DataProfileResult extends \Google\Protobuf\Internal\Message +{ + /** + * The count of rows processed in the data scan job. + * + * Generated from protobuf field int64 row_count = 1; + */ + protected $row_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $row_count + * The count of rows processed in the data scan job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The count of rows processed in the data scan job. + * + * Generated from protobuf field int64 row_count = 1; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The count of rows processed in the data scan job. + * + * Generated from protobuf field int64 row_count = 1; + * @param int|string $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataProfileResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataProfileResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php new file mode 100644 index 000000000000..345a434d0e4b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php @@ -0,0 +1,112 @@ +google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + */ +class DataQualityAppliedConfigs extends \Google\Protobuf\Internal\Message +{ + /** + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * + * Generated from protobuf field float sampling_percent = 1; + */ + protected $sampling_percent = 0.0; + /** + * Boolean indicating whether a row filter was applied in the DataScan job. + * + * Generated from protobuf field bool row_filter_applied = 2; + */ + protected $row_filter_applied = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $sampling_percent + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * @type bool $row_filter_applied + * Boolean indicating whether a row filter was applied in the DataScan job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * + * Generated from protobuf field float sampling_percent = 1; + * @return float + */ + public function getSamplingPercent() + { + return $this->sampling_percent; + } + + /** + * The percentage of the records selected from the dataset for DataScan. + * * Value ranges between 0.0 and 100.0. + * * Value 0.0 or 100.0 imply that sampling was not applied. + * + * Generated from protobuf field float sampling_percent = 1; + * @param float $var + * @return $this + */ + public function setSamplingPercent($var) + { + GPBUtil::checkFloat($var); + $this->sampling_percent = $var; + + return $this; + } + + /** + * Boolean indicating whether a row filter was applied in the DataScan job. + * + * Generated from protobuf field bool row_filter_applied = 2; + * @return bool + */ + public function getRowFilterApplied() + { + return $this->row_filter_applied; + } + + /** + * Boolean indicating whether a row filter was applied in the DataScan job. + * + * Generated from protobuf field bool row_filter_applied = 2; + * @param bool $var + * @return $this + */ + public function setRowFilterApplied($var) + { + GPBUtil::checkBool($var); + $this->row_filter_applied = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataQualityAppliedConfigs::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataQualityAppliedConfigs::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php new file mode 100644 index 000000000000..171f7d9baf54 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php @@ -0,0 +1,292 @@ +google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + */ +class DataQualityResult extends \Google\Protobuf\Internal\Message +{ + /** + * The count of rows processed in the data scan job. + * + * Generated from protobuf field int64 row_count = 1; + */ + protected $row_count = 0; + /** + * Whether the data quality result was `pass` or not. + * + * Generated from protobuf field bool passed = 2; + */ + protected $passed = false; + /** + * The result of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the bool value depicting whether the dimension result was + * `pass` or not. + * + * Generated from protobuf field map dimension_passed = 3; + */ + private $dimension_passed; + /** + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + /** + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map dimension_score = 5; + */ + private $dimension_score; + /** + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map column_score = 6; + */ + private $column_score; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $row_count + * The count of rows processed in the data scan job. + * @type bool $passed + * Whether the data quality result was `pass` or not. + * @type array|\Google\Protobuf\Internal\MapField $dimension_passed + * The result of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the bool value depicting whether the dimension result was + * `pass` or not. + * @type float $score + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * @type array|\Google\Protobuf\Internal\MapField $dimension_score + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * @type array|\Google\Protobuf\Internal\MapField $column_score + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The count of rows processed in the data scan job. + * + * Generated from protobuf field int64 row_count = 1; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The count of rows processed in the data scan job. + * + * Generated from protobuf field int64 row_count = 1; + * @param int|string $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + + /** + * Whether the data quality result was `pass` or not. + * + * Generated from protobuf field bool passed = 2; + * @return bool + */ + public function getPassed() + { + return $this->passed; + } + + /** + * Whether the data quality result was `pass` or not. + * + * Generated from protobuf field bool passed = 2; + * @param bool $var + * @return $this + */ + public function setPassed($var) + { + GPBUtil::checkBool($var); + $this->passed = $var; + + return $this; + } + + /** + * The result of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the bool value depicting whether the dimension result was + * `pass` or not. + * + * Generated from protobuf field map dimension_passed = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDimensionPassed() + { + return $this->dimension_passed; + } + + /** + * The result of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the bool value depicting whether the dimension result was + * `pass` or not. + * + * Generated from protobuf field map dimension_passed = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDimensionPassed($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::BOOL); + $this->dimension_passed = $arr; + + return $this; + } + + /** + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map dimension_score = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDimensionScore() + { + return $this->dimension_score; + } + + /** + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map dimension_score = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDimensionScore($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->dimension_score = $arr; + + return $this; + } + + /** + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map column_score = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getColumnScore() + { + return $this->column_score; + } + + /** + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map column_score = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setColumnScore($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->column_score = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataQualityResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataQualityResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php new file mode 100644 index 000000000000..d842233b4a2b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php @@ -0,0 +1,80 @@ +google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + */ +class PostScanActionsResult extends \Google\Protobuf\Internal\Message +{ + /** + * The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + */ + protected $bigquery_export_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult $bigquery_export_result + * The result of BigQuery export post scan action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * @return \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult|null + */ + public function getBigqueryExportResult() + { + return $this->bigquery_export_result; + } + + public function hasBigqueryExportResult() + { + return isset($this->bigquery_export_result); + } + + public function clearBigqueryExportResult() + { + unset($this->bigquery_export_result); + } + + /** + * The result of BigQuery export post scan action. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * @param \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult $var + * @return $this + */ + public function setBigqueryExportResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult::class); + $this->bigquery_export_result = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php new file mode 100644 index 000000000000..9cda8309c5b6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php @@ -0,0 +1,104 @@ +google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + */ +class BigQueryExportResult extends \Google\Protobuf\Internal\Message +{ + /** + * Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + */ + protected $state = 0; + /** + * Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Execution state for the BigQuery exporting. + * @type string $message + * Additional information about the BigQuery exporting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Execution state for the BigQuery exporting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult\State::class); + $this->state = $var; + + return $this; + } + + /** + * Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the BigQuery exporting. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult_BigQueryExportResult::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php new file mode 100644 index 000000000000..31bc945ef3fb --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php @@ -0,0 +1,72 @@ +google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State + */ +class State +{ + /** + * The exporting state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The exporting completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 1; + */ + const SUCCEEDED = 1; + /** + * The exporting is no longer running due to an error. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The exporting is skipped due to no valid scan result to export + * (usually caused by scan failed). + * + * Generated from protobuf enum SKIPPED = 3; + */ + const SKIPPED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::SKIPPED => 'SKIPPED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult_BigQueryExportResult_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php new file mode 100644 index 000000000000..5c9e261acb29 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.DataScanEvent.ScanType + */ +class ScanType +{ + /** + * An unspecified data scan type. + * + * Generated from protobuf enum SCAN_TYPE_UNSPECIFIED = 0; + */ + const SCAN_TYPE_UNSPECIFIED = 0; + /** + * Data scan for data profile. + * + * Generated from protobuf enum DATA_PROFILE = 1; + */ + const DATA_PROFILE = 1; + /** + * Data scan for data quality. + * + * Generated from protobuf enum DATA_QUALITY = 2; + */ + const DATA_QUALITY = 2; + + private static $valueToName = [ + self::SCAN_TYPE_UNSPECIFIED => 'SCAN_TYPE_UNSPECIFIED', + self::DATA_PROFILE => 'DATA_PROFILE', + self::DATA_QUALITY => 'DATA_QUALITY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ScanType::class, \Google\Cloud\Dataplex\V1\DataScanEvent_ScanType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php new file mode 100644 index 000000000000..b81bd29422c8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.DataScanEvent.Scope + */ +class Scope +{ + /** + * An unspecified scope type. + * + * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; + */ + const SCOPE_UNSPECIFIED = 0; + /** + * Data scan runs on all of the data. + * + * Generated from protobuf enum FULL = 1; + */ + const FULL = 1; + /** + * Data scan runs on incremental data. + * + * Generated from protobuf enum INCREMENTAL = 2; + */ + const INCREMENTAL = 2; + + private static $valueToName = [ + self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', + self::FULL => 'FULL', + self::INCREMENTAL => 'INCREMENTAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Scope::class, \Google\Cloud\Dataplex\V1\DataScanEvent_Scope::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php new file mode 100644 index 000000000000..29f93fc47dd1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php @@ -0,0 +1,85 @@ +google.cloud.dataplex.v1.DataScanEvent.State + */ +class State +{ + /** + * Unspecified job state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Data scan job started. + * + * Generated from protobuf enum STARTED = 1; + */ + const STARTED = 1; + /** + * Data scan job successfully completed. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Data scan job was unsuccessful. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Data scan job was cancelled. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + /** + * Data scan job was createed. + * + * Generated from protobuf enum CREATED = 5; + */ + const CREATED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTED => 'STARTED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + self::CREATED => 'CREATED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanEvent_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php new file mode 100644 index 000000000000..5eb2d66898ba --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.DataScanEvent.Trigger + */ +class Trigger +{ + /** + * An unspecified trigger type. + * + * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; + */ + const TRIGGER_UNSPECIFIED = 0; + /** + * Data scan triggers on demand. + * + * Generated from protobuf enum ON_DEMAND = 1; + */ + const ON_DEMAND = 1; + /** + * Data scan triggers as per schedule. + * + * Generated from protobuf enum SCHEDULE = 2; + */ + const SCHEDULE = 2; + + private static $valueToName = [ + self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', + self::ON_DEMAND => 'ON_DEMAND', + self::SCHEDULE => 'SCHEDULE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Trigger::class, \Google\Cloud\Dataplex\V1\DataScanEvent_Trigger::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php new file mode 100644 index 000000000000..c9d59028ed9e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php @@ -0,0 +1,453 @@ +google.cloud.dataplex.v1.DataScanJob + */ +class DataScanJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the DataScanJob, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the DataScanJob. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the DataScanJob was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time when the DataScanJob ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Execution state for the DataScanJob. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the current state. + * + * Generated from protobuf field string message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $message = ''; + /** + * Output only. The type of the parent DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + protected $spec; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the DataScanJob, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @type string $uid + * Output only. System generated globally unique ID for the DataScanJob. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time when the DataScanJob was started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time when the DataScanJob ended. + * @type int $state + * Output only. Execution state for the DataScanJob. + * @type string $message + * Output only. Additional information about the current state. + * @type int $type + * Output only. The type of the parent DataScan. + * @type \Google\Cloud\Dataplex\V1\DataQualitySpec $data_quality_spec + * Output only. DataQualityScan related setting. + * @type \Google\Cloud\Dataplex\V1\DataProfileSpec $data_profile_spec + * Output only. DataProfileScan related setting. + * @type \Google\Cloud\Dataplex\V1\DataQualityResult $data_quality_result + * Output only. The result of the data quality scan. + * @type \Google\Cloud\Dataplex\V1\DataProfileResult $data_profile_result + * Output only. The result of the data profile scan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the DataScanJob, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the DataScanJob, of the form: + * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the DataScanJob. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the DataScanJob. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the DataScanJob was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The time when the DataScanJob was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time when the DataScanJob ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time when the DataScanJob ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Execution state for the DataScanJob. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Execution state for the DataScanJob. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the current state. + * + * Generated from protobuf field string message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Output only. Additional information about the current state. + * + * Generated from protobuf field string message = 6 [(.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 type of the parent DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of the parent DataScan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. DataQualityScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataQualitySpec|null + */ + public function getDataQualitySpec() + { + return $this->readOneof(100); + } + + public function hasDataQualitySpec() + { + return $this->hasOneof(100); + } + + /** + * Output only. DataQualityScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataQualitySpec $var + * @return $this + */ + public function setDataQualitySpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Output only. DataProfileScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataProfileSpec|null + */ + public function getDataProfileSpec() + { + return $this->readOneof(101); + } + + public function hasDataProfileSpec() + { + return $this->hasOneof(101); + } + + /** + * Output only. DataProfileScan related setting. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataProfileSpec $var + * @return $this + */ + public function setDataProfileSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Output only. The result of the data quality scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataQualityResult|null + */ + public function getDataQualityResult() + { + return $this->readOneof(200); + } + + public function hasDataQualityResult() + { + return $this->hasOneof(200); + } + + /** + * Output only. The result of the data quality scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataQualityResult $var + * @return $this + */ + public function setDataQualityResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult::class); + $this->writeOneof(200, $var); + + return $this; + } + + /** + * Output only. The result of the data profile scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\DataProfileResult|null + */ + public function getDataProfileResult() + { + return $this->readOneof(201); + } + + public function hasDataProfileResult() + { + return $this->hasOneof(201); + } + + /** + * Output only. The result of the data profile scan. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\DataProfileResult $var + * @return $this + */ + public function setDataProfileResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult::class); + $this->writeOneof(201, $var); + + return $this; + } + + /** + * @return string + */ + public function getSpec() + { + return $this->whichOneof("spec"); + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php new file mode 100644 index 000000000000..2f9f1f2be1a4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php @@ -0,0 +1,92 @@ +google.cloud.dataplex.v1.DataScanJob.State + */ +class State +{ + /** + * The DataScanJob state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The DataScanJob is running. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The DataScanJob is canceling. + * + * Generated from protobuf enum CANCELING = 2; + */ + const CANCELING = 2; + /** + * The DataScanJob cancellation was successful. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The DataScanJob completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * The DataScanJob is no longer running due to an error. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The DataScanJob has been created but not started to run yet. + * + * Generated from protobuf enum PENDING = 7; + */ + const PENDING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::CANCELING => 'CANCELING', + self::CANCELLED => 'CANCELLED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::PENDING => 'PENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanJob_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php new file mode 100644 index 000000000000..66a3a372f908 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php @@ -0,0 +1,61 @@ +google.cloud.dataplex.v1.DataScanType + */ +class DataScanType +{ + /** + * The DataScan type is unspecified. + * + * Generated from protobuf enum DATA_SCAN_TYPE_UNSPECIFIED = 0; + */ + const DATA_SCAN_TYPE_UNSPECIFIED = 0; + /** + * Data Quality scan. + * + * Generated from protobuf enum DATA_QUALITY = 1; + */ + const DATA_QUALITY = 1; + /** + * Data Profile scan. + * + * Generated from protobuf enum DATA_PROFILE = 2; + */ + const DATA_PROFILE = 2; + + private static $valueToName = [ + self::DATA_SCAN_TYPE_UNSPECIFIED => 'DATA_SCAN_TYPE_UNSPECIFIED', + self::DATA_QUALITY => 'DATA_QUALITY', + self::DATA_PROFILE => 'DATA_PROFILE', + ]; + + 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php new file mode 100644 index 000000000000..4ed62915b28d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php @@ -0,0 +1,123 @@ +google.cloud.dataplex.v1.DataSource + */ +class DataSource extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity + * Immutable. The Dataplex entity that represents the data source (e.g. + * BigQuery table) for DataScan, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @type string $resource + * Immutable. The service-qualified full resource name of the cloud resource + * for a DataScan job to scan against. The field could be: BigQuery table of + * type "TABLE" for DataProfileScan/DataQualityScan Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The Dataplex entity that represents the data source (e.g. + * BigQuery table) for DataScan, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * Generated from protobuf field string entity = 100 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getEntity() + { + return $this->readOneof(100); + } + + public function hasEntity() + { + return $this->hasOneof(100); + } + + /** + * Immutable. The Dataplex entity that represents the data source (e.g. + * BigQuery table) for DataScan, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * Generated from protobuf field string entity = 100 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Immutable. The service-qualified full resource name of the cloud resource + * for a DataScan job to scan against. The field could be: BigQuery table of + * type "TABLE" for DataProfileScan/DataQualityScan Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string resource = 101 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResource() + { + return $this->readOneof(101); + } + + public function hasResource() + { + return $this->hasOneof(101); + } + + /** + * Immutable. The service-qualified full resource name of the cloud resource + * for a DataScan job to scan against. The field could be: BigQuery table of + * type "TABLE" for DataProfileScan/DataQualityScan Format: + * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + * + * Generated from protobuf field string resource = 101 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php new file mode 100644 index 000000000000..5fb5f3a7c589 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php @@ -0,0 +1,415 @@ +google.cloud.dataplex.v1.DataTaxonomy + */ +class DataTaxonomy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the DataTaxonomy, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the dataTaxonomy. This + * ID will be different if the DataTaxonomy is deleted and re-created with the + * same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the DataTaxonomy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the DataTaxonomy was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Description of the DataTaxonomy. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. User-defined labels for the DataTaxonomy. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. The number of attributes in the DataTaxonomy. + * + * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attribute_count = 0; + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 10; + */ + protected $etag = ''; + /** + * Output only. The number of classes in the DataTaxonomy. + * + * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $class_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the DataTaxonomy, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. + * @type string $uid + * Output only. System generated globally unique ID for the dataTaxonomy. This + * ID will be different if the DataTaxonomy is deleted and re-created with the + * same name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the DataTaxonomy was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the DataTaxonomy was last updated. + * @type string $description + * Optional. Description of the DataTaxonomy. + * @type string $display_name + * Optional. User friendly display name. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for the DataTaxonomy. + * @type int $attribute_count + * Output only. The number of attributes in the DataTaxonomy. + * @type string $etag + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type int $class_count + * Output only. The number of classes in the DataTaxonomy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the DataTaxonomy, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the DataTaxonomy, of the form: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the dataTaxonomy. This + * ID will be different if the DataTaxonomy is deleted and re-created with the + * same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the dataTaxonomy. This + * ID will be different if the DataTaxonomy is deleted and re-created with the + * same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the DataTaxonomy was created. + * + * 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. The time when the DataTaxonomy was created. + * + * 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. The time when the DataTaxonomy was last updated. + * + * 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. The time when the DataTaxonomy was last updated. + * + * 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. Description of the DataTaxonomy. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the DataTaxonomy. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. User-defined labels for the DataTaxonomy. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for the DataTaxonomy. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The number of attributes in the DataTaxonomy. + * + * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAttributeCount() + { + return $this->attribute_count; + } + + /** + * Output only. The number of attributes in the DataTaxonomy. + * + * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAttributeCount($var) + { + GPBUtil::checkInt32($var); + $this->attribute_count = $var; + + return $this; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 10; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 10; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The number of classes in the DataTaxonomy. + * + * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getClassCount() + { + return $this->class_count; + } + + /** + * Output only. The number of classes in the DataTaxonomy. + * + * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setClassCount($var) + { + GPBUtil::checkInt32($var); + $this->class_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php new file mode 100644 index 000000000000..52cbcfe8c9d8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.DeleteAssetRequest + */ +class DeleteAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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 asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see + * {@see DataplexServiceClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteAssetRequest + * + * @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 asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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 asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php new file mode 100644 index 000000000000..132887e9d3a5 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.DeleteContentRequest + */ +class DeleteContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * 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 content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * Please see {@see ContentServiceClient::contentName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteContentRequest + * + * @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 content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * 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 content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php new file mode 100644 index 000000000000..4efe4d2724c9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php @@ -0,0 +1,132 @@ +google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + */ +class DeleteDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. If the client provided etag value does not match the current etag + * value, the DeleteDataAttributeBindingRequest method returns an ABORTED + * error response. Etags must be used when calling the + * DeleteDataAttributeBinding. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * Please see {@see DataTaxonomyServiceClient::dataAttributeBindingName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteDataAttributeBindingRequest + * + * @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 DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @type string $etag + * Required. If the client provided etag value does not match the current etag + * value, the DeleteDataAttributeBindingRequest method returns an ABORTED + * error response. Etags must be used when calling the + * DeleteDataAttributeBinding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * + * 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 DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. If the client provided etag value does not match the current etag + * value, the DeleteDataAttributeBindingRequest method returns an ABORTED + * error response. Etags must be used when calling the + * DeleteDataAttributeBinding. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Required. If the client provided etag value does not match the current etag + * value, the DeleteDataAttributeBindingRequest method returns an ABORTED + * error response. Etags must be used when calling the + * DeleteDataAttributeBinding. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php new file mode 100644 index 000000000000..819df2652cfd --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php @@ -0,0 +1,124 @@ +google.cloud.dataplex.v1.DeleteDataAttributeRequest + */ +class DeleteDataAttributeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteDataAttribute method returns an ABORTED error response. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * Please see {@see DataTaxonomyServiceClient::dataAttributeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteDataAttributeRequest + * + * @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 DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @type string $etag + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteDataAttribute method returns an ABORTED error response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * 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 DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * 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 the client provided etag value does not match the current etag + * value, the DeleteDataAttribute method returns an ABORTED error response. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteDataAttribute method returns an ABORTED error response. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php new file mode 100644 index 000000000000..613ef402d4ea --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php @@ -0,0 +1,96 @@ +google.cloud.dataplex.v1.DeleteDataScanRequest + */ +class DeleteDataScanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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 dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. Please see + * {@see DataScanServiceClient::dataScanName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteDataScanRequest + * + * @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 dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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 dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php new file mode 100644 index 000000000000..a06802b72d28 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php @@ -0,0 +1,124 @@ +google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + */ +class DeleteDataTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If the client provided etag value does not match the current etag + * value,the DeleteDataTaxonomy method returns an ABORTED error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteDataTaxonomyRequest + * + * @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 DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @type string $etag + * Optional. If the client provided etag value does not match the current etag + * value,the DeleteDataTaxonomy method returns an ABORTED error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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 DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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 the client provided etag value does not match the current etag + * value,the DeleteDataTaxonomy method returns an ABORTED error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. If the client provided etag value does not match the current etag + * value,the DeleteDataTaxonomy method returns an ABORTED error. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php new file mode 100644 index 000000000000..60803562a44c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php @@ -0,0 +1,124 @@ +google.cloud.dataplex.v1.DeleteEntityRequest + */ +class DeleteEntityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see + * {@see MetadataServiceClient::entityName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteEntityRequest + * + * @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 entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @type string $etag + * Required. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * 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 entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Required. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php new file mode 100644 index 000000000000..39a9ffc44d4a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.DeleteEnvironmentRequest + */ +class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * + * 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 environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see + * {@see DataplexServiceClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteEnvironmentRequest + * + * @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 environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * + * 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 environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php new file mode 100644 index 000000000000..7290cc2f7e49 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.DeleteLakeRequest + */ +class DeleteLakeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteLakeRequest + * + * @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 lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php new file mode 100644 index 000000000000..4b9c452fa696 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php @@ -0,0 +1,140 @@ +google.cloud.dataplex.v1.DeletePartitionRequest + */ +class DeletePartitionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The etag associated with the partition. + * + * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. Please see + * {@see MetadataServiceClient::partitionName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeletePartitionRequest + * + * @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 partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * @type string $etag + * Optional. The etag associated with the partition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * + * 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 partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * + * 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 etag associated with the partition. + * + * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getEtag() + { + @trigger_error('etag is deprecated.', E_USER_DEPRECATED); + return $this->etag; + } + + /** + * Optional. The etag associated with the partition. + * + * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setEtag($var) + { + @trigger_error('etag is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php new file mode 100644 index 000000000000..29666656ccad --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.DeleteTaskRequest + */ +class DeleteTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + * + * 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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. Please see + * {@see DataplexServiceClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteTaskRequest + * + * @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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + * + * 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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php new file mode 100644 index 000000000000..d22235aebd9b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.DeleteZoneRequest + */ +class DeleteZoneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see + * {@see DataplexServiceClient::zoneName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\DeleteZoneRequest + * + * @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 zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php new file mode 100644 index 000000000000..c72a91aa4b02 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php @@ -0,0 +1,378 @@ +google.cloud.dataplex.v1.DiscoveryEvent + */ +class DiscoveryEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The log message. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * The id of the associated lake. + * + * Generated from protobuf field string lake_id = 2; + */ + protected $lake_id = ''; + /** + * The id of the associated zone. + * + * Generated from protobuf field string zone_id = 3; + */ + protected $zone_id = ''; + /** + * The id of the associated asset. + * + * Generated from protobuf field string asset_id = 4; + */ + protected $asset_id = ''; + /** + * The data location associated with the event. + * + * Generated from protobuf field string data_location = 5; + */ + protected $data_location = ''; + /** + * The type of the event being logged. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; + */ + protected $type = 0; + protected $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * The log message. + * @type string $lake_id + * The id of the associated lake. + * @type string $zone_id + * The id of the associated zone. + * @type string $asset_id + * The id of the associated asset. + * @type string $data_location + * The data location associated with the event. + * @type int $type + * The type of the event being logged. + * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $config + * Details about discovery configuration in effect. + * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $entity + * Details about the entity associated with the event. + * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $partition + * Details about the partition associated with the event. + * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $action + * Details about the action associated with the event. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The id of the associated lake. + * + * Generated from protobuf field string lake_id = 2; + * @return string + */ + public function getLakeId() + { + return $this->lake_id; + } + + /** + * The id of the associated lake. + * + * Generated from protobuf field string lake_id = 2; + * @param string $var + * @return $this + */ + public function setLakeId($var) + { + GPBUtil::checkString($var, True); + $this->lake_id = $var; + + return $this; + } + + /** + * The id of the associated zone. + * + * Generated from protobuf field string zone_id = 3; + * @return string + */ + public function getZoneId() + { + return $this->zone_id; + } + + /** + * The id of the associated zone. + * + * Generated from protobuf field string zone_id = 3; + * @param string $var + * @return $this + */ + public function setZoneId($var) + { + GPBUtil::checkString($var, True); + $this->zone_id = $var; + + return $this; + } + + /** + * The id of the associated asset. + * + * Generated from protobuf field string asset_id = 4; + * @return string + */ + public function getAssetId() + { + return $this->asset_id; + } + + /** + * The id of the associated asset. + * + * Generated from protobuf field string asset_id = 4; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + + /** + * The data location associated with the event. + * + * Generated from protobuf field string data_location = 5; + * @return string + */ + public function getDataLocation() + { + return $this->data_location; + } + + /** + * The data location associated with the event. + * + * Generated from protobuf field string data_location = 5; + * @param string $var + * @return $this + */ + public function setDataLocation($var) + { + GPBUtil::checkString($var, True); + $this->data_location = $var; + + return $this; + } + + /** + * The type of the event being logged. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the event being logged. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EventType::class); + $this->type = $var; + + return $this; + } + + /** + * Details about discovery configuration in effect. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20; + * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails|null + */ + public function getConfig() + { + return $this->readOneof(20); + } + + public function hasConfig() + { + return $this->hasOneof(20); + } + + /** + * Details about discovery configuration in effect. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20; + * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Details about the entity associated with the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21; + * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails|null + */ + public function getEntity() + { + return $this->readOneof(21); + } + + public function hasEntity() + { + return $this->hasOneof(21); + } + + /** + * Details about the entity associated with the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21; + * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Details about the partition associated with the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22; + * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails|null + */ + public function getPartition() + { + return $this->readOneof(22); + } + + public function hasPartition() + { + return $this->hasOneof(22); + } + + /** + * Details about the partition associated with the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22; + * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Details about the action associated with the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23; + * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails|null + */ + public function getAction() + { + return $this->readOneof(23); + } + + public function hasAction() + { + return $this->hasOneof(23); + } + + /** + * Details about the action associated with the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23; + * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * @return string + */ + public function getDetails() + { + return $this->whichOneof("details"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php new file mode 100644 index 000000000000..a0159af03d0f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php @@ -0,0 +1,74 @@ +google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + */ +class ActionDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The type of action. + * Eg. IncompatibleDataSchema, InvalidDataFormat + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The type of action. + * Eg. IncompatibleDataSchema, InvalidDataFormat + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The type of action. + * Eg. IncompatibleDataSchema, InvalidDataFormat + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of action. + * Eg. IncompatibleDataSchema, InvalidDataFormat + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ActionDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_ActionDetails::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php new file mode 100644 index 000000000000..50371340de3b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php @@ -0,0 +1,82 @@ +google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + */ +class ConfigDetails extends \Google\Protobuf\Internal\Message +{ + /** + * A list of discovery configuration parameters in effect. + * The keys are the field paths within DiscoverySpec. + * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + * etc. + * + * Generated from protobuf field map parameters = 1; + */ + private $parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $parameters + * A list of discovery configuration parameters in effect. + * The keys are the field paths within DiscoverySpec. + * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + * etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * A list of discovery configuration parameters in effect. + * The keys are the field paths within DiscoverySpec. + * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + * etc. + * + * Generated from protobuf field map parameters = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * A list of discovery configuration parameters in effect. + * The keys are the field paths within DiscoverySpec. + * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + * etc. + * + * Generated from protobuf field map parameters = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->parameters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConfigDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_ConfigDetails::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php new file mode 100644 index 000000000000..9ed95e8a58e9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php @@ -0,0 +1,108 @@ +google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + */ +class EntityDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the entity resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string entity = 1; + */ + protected $entity = ''; + /** + * The type of the entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity + * The name of the entity resource. + * The name is the fully-qualified resource name. + * @type int $type + * The type of the entity resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The name of the entity resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string entity = 1; + * @return string + */ + public function getEntity() + { + return $this->entity; + } + + /** + * The name of the entity resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string entity = 1; + * @param string $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkString($var, True); + $this->entity = $var; + + return $this; + } + + /** + * The type of the entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityType::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EntityDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EntityDetails::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php new file mode 100644 index 000000000000..6bb43ff6c38d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.DiscoveryEvent.EntityType + */ +class EntityType +{ + /** + * An unspecified event type. + * + * Generated from protobuf enum ENTITY_TYPE_UNSPECIFIED = 0; + */ + const ENTITY_TYPE_UNSPECIFIED = 0; + /** + * Entities representing structured data. + * + * Generated from protobuf enum TABLE = 1; + */ + const TABLE = 1; + /** + * Entities representing unstructured data. + * + * Generated from protobuf enum FILESET = 2; + */ + const FILESET = 2; + + private static $valueToName = [ + self::ENTITY_TYPE_UNSPECIFIED => 'ENTITY_TYPE_UNSPECIFIED', + self::TABLE => 'TABLE', + self::FILESET => 'FILESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EntityType::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EntityType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php new file mode 100644 index 000000000000..6bcc8a2096e4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php @@ -0,0 +1,99 @@ +google.cloud.dataplex.v1.DiscoveryEvent.EventType + */ +class EventType +{ + /** + * An unspecified event type. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * An event representing discovery configuration in effect. + * + * Generated from protobuf enum CONFIG = 1; + */ + const CONFIG = 1; + /** + * An event representing a metadata entity being created. + * + * Generated from protobuf enum ENTITY_CREATED = 2; + */ + const ENTITY_CREATED = 2; + /** + * An event representing a metadata entity being updated. + * + * Generated from protobuf enum ENTITY_UPDATED = 3; + */ + const ENTITY_UPDATED = 3; + /** + * An event representing a metadata entity being deleted. + * + * Generated from protobuf enum ENTITY_DELETED = 4; + */ + const ENTITY_DELETED = 4; + /** + * An event representing a partition being created. + * + * Generated from protobuf enum PARTITION_CREATED = 5; + */ + const PARTITION_CREATED = 5; + /** + * An event representing a partition being updated. + * + * Generated from protobuf enum PARTITION_UPDATED = 6; + */ + const PARTITION_UPDATED = 6; + /** + * An event representing a partition being deleted. + * + * Generated from protobuf enum PARTITION_DELETED = 7; + */ + const PARTITION_DELETED = 7; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::CONFIG => 'CONFIG', + self::ENTITY_CREATED => 'ENTITY_CREATED', + self::ENTITY_UPDATED => 'ENTITY_UPDATED', + self::ENTITY_DELETED => 'ENTITY_DELETED', + self::PARTITION_CREATED => 'PARTITION_CREATED', + self::PARTITION_UPDATED => 'PARTITION_UPDATED', + self::PARTITION_DELETED => 'PARTITION_DELETED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EventType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php new file mode 100644 index 000000000000..111e8dab6343 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php @@ -0,0 +1,184 @@ +google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + */ +class PartitionDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The name to the partition resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string partition = 1; + */ + protected $partition = ''; + /** + * The name to the containing entity resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string entity = 2; + */ + protected $entity = ''; + /** + * The type of the containing entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; + */ + protected $type = 0; + /** + * The locations of the data items (e.g., a Cloud Storage objects) sampled + * for metadata inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 4; + */ + private $sampled_data_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $partition + * The name to the partition resource. + * The name is the fully-qualified resource name. + * @type string $entity + * The name to the containing entity resource. + * The name is the fully-qualified resource name. + * @type int $type + * The type of the containing entity resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations + * The locations of the data items (e.g., a Cloud Storage objects) sampled + * for metadata inference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The name to the partition resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string partition = 1; + * @return string + */ + public function getPartition() + { + return $this->partition; + } + + /** + * The name to the partition resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string partition = 1; + * @param string $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkString($var, True); + $this->partition = $var; + + return $this; + } + + /** + * The name to the containing entity resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string entity = 2; + * @return string + */ + public function getEntity() + { + return $this->entity; + } + + /** + * The name to the containing entity resource. + * The name is the fully-qualified resource name. + * + * Generated from protobuf field string entity = 2; + * @param string $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkString($var, True); + $this->entity = $var; + + return $this; + } + + /** + * The type of the containing entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the containing entity resource. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityType::class); + $this->type = $var; + + return $this; + } + + /** + * The locations of the data items (e.g., a Cloud Storage objects) sampled + * for metadata inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSampledDataLocations() + { + return $this->sampled_data_locations; + } + + /** + * The locations of the data items (e.g., a Cloud Storage objects) sampled + * for metadata inference. + * + * Generated from protobuf field repeated string sampled_data_locations = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSampledDataLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->sampled_data_locations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PartitionDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_PartitionDetails::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php new file mode 100644 index 000000000000..452871e6f7eb --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php @@ -0,0 +1,785 @@ +google.cloud.dataplex.v1.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the entity, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Display name must be shorter than or equal to 256 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. User friendly longer description text. Must be shorter than or + * equal to 1024 characters. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The time when the entity 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 when the entity was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. A user-provided entity ID. It is mutable, and will be used as the + * published table name. Specifying a new ID in an update entity + * request will override the existing value. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), and + * underscores, and consist of 256 or fewer characters. + * + * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Optional. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. Required for update and delete requests. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + /** + * Required. Immutable. The type of entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Required. Immutable. The ID of the asset associated with the storage + * location containing the entity data. The entity must be with in the same + * zone with the asset. + * + * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $asset = ''; + /** + * Required. Immutable. The storage path of the entity data. + * For Cloud Storage data, this is the fully-qualified path to the entity, + * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + * the table resource, such as + * `projects/project_id/datasets/dataset_id/tables/table_id`. + * + * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $data_path = ''; + /** + * Optional. The set of items within the data path constituting the data in + * the entity, represented as a glob path. Example: + * `gs://bucket/path/to/data/**/*.csv`. + * + * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_path_pattern = ''; + /** + * Output only. The name of the associated Data Catalog entry. + * + * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $catalog_entry = ''; + /** + * Required. Immutable. Identifies the storage system of the entity data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $system = 0; + /** + * Required. Identifies the storage format of the entity data. + * It does not apply to entities with data stored in BigQuery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $format = null; + /** + * Output only. Metadata stores that the entity is compatible with. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compatibility = null; + /** + * Output only. Identifies the access mechanism to the entity. Not user + * settable. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $access = null; + /** + * Output only. System generated unique ID for the Entity. This ID will be + * different if the Entity is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The description of the data structure and layout. + * The schema is not included in list responses. It is only included in + * `SCHEMA` and `FULL` entity views of a `GetEntity` response. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the entity, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + * @type string $display_name + * Optional. Display name must be shorter than or equal to 256 characters. + * @type string $description + * Optional. User friendly longer description text. Must be shorter than or + * equal to 1024 characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the entity was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the entity was last updated. + * @type string $id + * Required. A user-provided entity ID. It is mutable, and will be used as the + * published table name. Specifying a new ID in an update entity + * request will override the existing value. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), and + * underscores, and consist of 256 or fewer characters. + * @type string $etag + * Optional. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. Required for update and delete requests. + * @type int $type + * Required. Immutable. The type of entity. + * @type string $asset + * Required. Immutable. The ID of the asset associated with the storage + * location containing the entity data. The entity must be with in the same + * zone with the asset. + * @type string $data_path + * Required. Immutable. The storage path of the entity data. + * For Cloud Storage data, this is the fully-qualified path to the entity, + * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + * the table resource, such as + * `projects/project_id/datasets/dataset_id/tables/table_id`. + * @type string $data_path_pattern + * Optional. The set of items within the data path constituting the data in + * the entity, represented as a glob path. Example: + * `gs://bucket/path/to/data/**/*.csv`. + * @type string $catalog_entry + * Output only. The name of the associated Data Catalog entry. + * @type int $system + * Required. Immutable. Identifies the storage system of the entity data. + * @type \Google\Cloud\Dataplex\V1\StorageFormat $format + * Required. Identifies the storage format of the entity data. + * It does not apply to entities with data stored in BigQuery. + * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus $compatibility + * Output only. Metadata stores that the entity is compatible with. + * @type \Google\Cloud\Dataplex\V1\StorageAccess $access + * Output only. Identifies the access mechanism to the entity. Not user + * settable. + * @type string $uid + * Output only. System generated unique ID for the Entity. This ID will be + * different if the Entity is deleted and re-created with the same name. + * @type \Google\Cloud\Dataplex\V1\Schema $schema + * Required. The description of the data structure and layout. + * The schema is not included in list responses. It is only included in + * `SCHEMA` and `FULL` entity views of a `GetEntity` response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the entity, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the entity, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Display name must be shorter than or equal to 256 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Display name must be shorter than or equal to 256 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. User friendly longer description text. Must be shorter than or + * equal to 1024 characters. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User friendly longer description text. Must be shorter than or + * equal to 1024 characters. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The time when the entity 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 when the entity 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 when the entity 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 when the entity 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; + } + + /** + * Required. A user-provided entity ID. It is mutable, and will be used as the + * published table name. Specifying a new ID in an update entity + * request will override the existing value. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), and + * underscores, and consist of 256 or fewer characters. + * + * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. A user-provided entity ID. It is mutable, and will be used as the + * published table name. Specifying a new ID in an update entity + * request will override the existing value. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), and + * underscores, and consist of 256 or fewer characters. + * + * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Optional. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. Required for update and delete requests. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. Required for update and delete requests. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Required. Immutable. The type of entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Immutable. The type of entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Entity\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Immutable. The ID of the asset associated with the storage + * location containing the entity data. The entity must be with in the same + * zone with the asset. + * + * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Required. Immutable. The ID of the asset associated with the storage + * location containing the entity data. The entity must be with in the same + * zone with the asset. + * + * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->asset = $var; + + return $this; + } + + /** + * Required. Immutable. The storage path of the entity data. + * For Cloud Storage data, this is the fully-qualified path to the entity, + * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + * the table resource, such as + * `projects/project_id/datasets/dataset_id/tables/table_id`. + * + * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getDataPath() + { + return $this->data_path; + } + + /** + * Required. Immutable. The storage path of the entity data. + * For Cloud Storage data, this is the fully-qualified path to the entity, + * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + * the table resource, such as + * `projects/project_id/datasets/dataset_id/tables/table_id`. + * + * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setDataPath($var) + { + GPBUtil::checkString($var, True); + $this->data_path = $var; + + return $this; + } + + /** + * Optional. The set of items within the data path constituting the data in + * the entity, represented as a glob path. Example: + * `gs://bucket/path/to/data/**/*.csv`. + * + * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDataPathPattern() + { + return $this->data_path_pattern; + } + + /** + * Optional. The set of items within the data path constituting the data in + * the entity, represented as a glob path. Example: + * `gs://bucket/path/to/data/**/*.csv`. + * + * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDataPathPattern($var) + { + GPBUtil::checkString($var, True); + $this->data_path_pattern = $var; + + return $this; + } + + /** + * Output only. The name of the associated Data Catalog entry. + * + * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCatalogEntry() + { + return $this->catalog_entry; + } + + /** + * Output only. The name of the associated Data Catalog entry. + * + * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCatalogEntry($var) + { + GPBUtil::checkString($var, True); + $this->catalog_entry = $var; + + return $this; + } + + /** + * Required. Immutable. Identifies the storage system of the entity data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getSystem() + { + return $this->system; + } + + /** + * Required. Immutable. Identifies the storage system of the entity data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setSystem($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageSystem::class); + $this->system = $var; + + return $this; + } + + /** + * Required. Identifies the storage format of the entity data. + * It does not apply to entities with data stored in BigQuery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\StorageFormat|null + */ + public function getFormat() + { + return $this->format; + } + + public function hasFormat() + { + return isset($this->format); + } + + public function clearFormat() + { + unset($this->format); + } + + /** + * Required. Identifies the storage format of the entity data. + * It does not apply to entities with data stored in BigQuery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\StorageFormat $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat::class); + $this->format = $var; + + return $this; + } + + /** + * Output only. Metadata stores that the entity is compatible with. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus|null + */ + public function getCompatibility() + { + return $this->compatibility; + } + + public function hasCompatibility() + { + return isset($this->compatibility); + } + + public function clearCompatibility() + { + unset($this->compatibility); + } + + /** + * Output only. Metadata stores that the entity is compatible with. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus $var + * @return $this + */ + public function setCompatibility($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus::class); + $this->compatibility = $var; + + return $this; + } + + /** + * Output only. Identifies the access mechanism to the entity. Not user + * settable. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\StorageAccess|null + */ + public function getAccess() + { + return $this->access; + } + + public function hasAccess() + { + return isset($this->access); + } + + public function clearAccess() + { + unset($this->access); + } + + /** + * Output only. Identifies the access mechanism to the entity. Not user + * settable. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\StorageAccess $var + * @return $this + */ + public function setAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageAccess::class); + $this->access = $var; + + return $this; + } + + /** + * Output only. System generated unique ID for the Entity. This ID will be + * different if the Entity is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated unique ID for the Entity. This ID will be + * different if the Entity is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Required. The description of the data structure and layout. + * The schema is not included in list responses. It is only included in + * `SCHEMA` and `FULL` entity views of a `GetEntity` response. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Schema|null + */ + public function getSchema() + { + return $this->schema; + } + + public function hasSchema() + { + return isset($this->schema); + } + + public function clearSchema() + { + unset($this->schema); + } + + /** + * Required. The description of the data structure and layout. + * The schema is not included in list responses. It is only included in + * `SCHEMA` and `FULL` entity views of a `GetEntity` response. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Schema $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Schema::class); + $this->schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php new file mode 100644 index 000000000000..c329e3c6cc85 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php @@ -0,0 +1,124 @@ +google.cloud.dataplex.v1.Entity.CompatibilityStatus + */ +class CompatibilityStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether this entity is compatible with Hive Metastore. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hive_metastore = null; + /** + * Output only. Whether this entity is compatible with BigQuery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $bigquery = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $hive_metastore + * Output only. Whether this entity is compatible with Hive Metastore. + * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $bigquery + * Output only. Whether this entity is compatible with BigQuery. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether this entity is compatible with Hive Metastore. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility|null + */ + public function getHiveMetastore() + { + return $this->hive_metastore; + } + + public function hasHiveMetastore() + { + return isset($this->hive_metastore); + } + + public function clearHiveMetastore() + { + unset($this->hive_metastore); + } + + /** + * Output only. Whether this entity is compatible with Hive Metastore. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $var + * @return $this + */ + public function setHiveMetastore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility::class); + $this->hive_metastore = $var; + + return $this; + } + + /** + * Output only. Whether this entity is compatible with BigQuery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility|null + */ + public function getBigquery() + { + return $this->bigquery; + } + + public function hasBigquery() + { + return isset($this->bigquery); + } + + public function clearBigquery() + { + unset($this->bigquery); + } + + /** + * Output only. Whether this entity is compatible with BigQuery. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $var + * @return $this + */ + public function setBigquery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility::class); + $this->bigquery = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompatibilityStatus::class, \Google\Cloud\Dataplex\V1\Entity_CompatibilityStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php new file mode 100644 index 000000000000..31fef738a26b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php @@ -0,0 +1,112 @@ +google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + */ +class Compatibility extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether the entity is compatible and can be represented in + * the metadata store. + * + * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compatible = false; + /** + * Output only. Provides additional detail if the entity is incompatible + * with the metadata store. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $compatible + * Output only. Whether the entity is compatible and can be represented in + * the metadata store. + * @type string $reason + * Output only. Provides additional detail if the entity is incompatible + * with the metadata store. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether the entity is compatible and can be represented in + * the metadata store. + * + * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getCompatible() + { + return $this->compatible; + } + + /** + * Output only. Whether the entity is compatible and can be represented in + * the metadata store. + * + * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setCompatible($var) + { + GPBUtil::checkBool($var); + $this->compatible = $var; + + return $this; + } + + /** + * Output only. Provides additional detail if the entity is incompatible + * with the metadata store. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Output only. Provides additional detail if the entity is incompatible + * with the metadata store. + * + * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Compatibility::class, \Google\Cloud\Dataplex\V1\Entity_CompatibilityStatus_Compatibility::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php new file mode 100644 index 000000000000..15f0ab139313 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.Entity.Type + */ +class Type +{ + /** + * Type unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Structured and semi-structured data. + * + * Generated from protobuf enum TABLE = 1; + */ + const TABLE = 1; + /** + * Unstructured data. + * + * Generated from protobuf enum FILESET = 2; + */ + const FILESET = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TABLE => 'TABLE', + self::FILESET => 'FILESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Dataplex\V1\Entity_Type::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php new file mode 100644 index 000000000000..3236d2eab3a1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php @@ -0,0 +1,518 @@ +google.cloud.dataplex.v1.Environment + */ +class Environment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the environment, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. System generated globally unique ID for the environment. This + * ID will be different if the environment is deleted and re-created with the + * same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. Environment creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the environment was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User defined labels for the environment. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of the environment. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Current state of the environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Infrastructure specification for the Environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $infrastructure_spec = null; + /** + * Optional. Configuration for sessions created for this environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $session_spec = null; + /** + * Output only. Status of sessions created for this environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $session_status = null; + /** + * Output only. URI Endpoints to access sessions associated with the + * Environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $endpoints = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the environment, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * @type string $display_name + * Optional. User friendly display name. + * @type string $uid + * Output only. System generated globally unique ID for the environment. This + * ID will be different if the environment is deleted and re-created with the + * same name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Environment creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the environment was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User defined labels for the environment. + * @type string $description + * Optional. Description of the environment. + * @type int $state + * Output only. Current state of the environment. + * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec $infrastructure_spec + * Required. Infrastructure specification for the Environment. + * @type \Google\Cloud\Dataplex\V1\Environment\SessionSpec $session_spec + * Optional. Configuration for sessions created for this environment. + * @type \Google\Cloud\Dataplex\V1\Environment\SessionStatus $session_status + * Output only. Status of sessions created for this environment. + * @type \Google\Cloud\Dataplex\V1\Environment\Endpoints $endpoints + * Output only. URI Endpoints to access sessions associated with the + * Environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the environment, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the environment, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the environment. This + * ID will be different if the environment is deleted and re-created with the + * same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the environment. This + * ID will be different if the environment is deleted and re-created with the + * same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. Environment creation 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. Environment creation 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. The time when the environment 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 when the environment 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; + } + + /** + * Optional. User defined labels for the environment. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User defined labels for the environment. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Description of the environment. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the environment. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Current state of the environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Infrastructure specification for the Environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec|null + */ + public function getInfrastructureSpec() + { + return $this->infrastructure_spec; + } + + public function hasInfrastructureSpec() + { + return isset($this->infrastructure_spec); + } + + public function clearInfrastructureSpec() + { + unset($this->infrastructure_spec); + } + + /** + * Required. Infrastructure specification for the Environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec $var + * @return $this + */ + public function setInfrastructureSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec::class); + $this->infrastructure_spec = $var; + + return $this; + } + + /** + * Optional. Configuration for sessions created for this environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Environment\SessionSpec|null + */ + public function getSessionSpec() + { + return $this->session_spec; + } + + public function hasSessionSpec() + { + return isset($this->session_spec); + } + + public function clearSessionSpec() + { + unset($this->session_spec); + } + + /** + * Optional. Configuration for sessions created for this environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Environment\SessionSpec $var + * @return $this + */ + public function setSessionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\SessionSpec::class); + $this->session_spec = $var; + + return $this; + } + + /** + * Output only. Status of sessions created for this environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Environment\SessionStatus|null + */ + public function getSessionStatus() + { + return $this->session_status; + } + + public function hasSessionStatus() + { + return isset($this->session_status); + } + + public function clearSessionStatus() + { + unset($this->session_status); + } + + /** + * Output only. Status of sessions created for this environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Environment\SessionStatus $var + * @return $this + */ + public function setSessionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\SessionStatus::class); + $this->session_status = $var; + + return $this; + } + + /** + * Output only. URI Endpoints to access sessions associated with the + * Environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Environment\Endpoints|null + */ + public function getEndpoints() + { + return $this->endpoints; + } + + public function hasEndpoints() + { + return isset($this->endpoints); + } + + public function clearEndpoints() + { + unset($this->endpoints); + } + + /** + * Output only. URI Endpoints to access sessions associated with the + * Environment. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Environment\Endpoints $var + * @return $this + */ + public function setEndpoints($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\Endpoints::class); + $this->endpoints = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php new file mode 100644 index 000000000000..018f2692a575 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php @@ -0,0 +1,104 @@ +google.cloud.dataplex.v1.Environment.Endpoints + */ +class Endpoints extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. URI to serve notebook APIs + * + * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $notebooks = ''; + /** + * Output only. URI to serve SQL APIs + * + * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sql = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notebooks + * Output only. URI to serve notebook APIs + * @type string $sql + * Output only. URI to serve SQL APIs + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Output only. URI to serve notebook APIs + * + * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNotebooks() + { + return $this->notebooks; + } + + /** + * Output only. URI to serve notebook APIs + * + * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNotebooks($var) + { + GPBUtil::checkString($var, True); + $this->notebooks = $var; + + return $this; + } + + /** + * Output only. URI to serve SQL APIs + * + * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSql() + { + return $this->sql; + } + + /** + * Output only. URI to serve SQL APIs + * + * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSql($var) + { + GPBUtil::checkString($var, True); + $this->sql = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Endpoints::class, \Google\Cloud\Dataplex\V1\Environment_Endpoints::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php new file mode 100644 index 000000000000..b5402934b75d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php @@ -0,0 +1,123 @@ +google.cloud.dataplex.v1.Environment.InfrastructureSpec + */ +class InfrastructureSpec extends \Google\Protobuf\Internal\Message +{ + protected $resources; + protected $runtime; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources $compute + * Optional. Compute resources needed for analyze interactive workloads. + * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime $os_image + * Required. Software Runtime Configuration for analyze interactive + * workloads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Compute resources needed for analyze interactive workloads. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources compute = 50 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources|null + */ + public function getCompute() + { + return $this->readOneof(50); + } + + public function hasCompute() + { + return $this->hasOneof(50); + } + + /** + * Optional. Compute resources needed for analyze interactive workloads. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources compute = 50 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources $var + * @return $this + */ + public function setCompute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources::class); + $this->writeOneof(50, $var); + + return $this; + } + + /** + * Required. Software Runtime Configuration for analyze interactive + * workloads. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime os_image = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime|null + */ + public function getOsImage() + { + return $this->readOneof(100); + } + + public function hasOsImage() + { + return $this->hasOneof(100); + } + + /** + * Required. Software Runtime Configuration for analyze interactive + * workloads. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime os_image = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime $var + * @return $this + */ + public function setOsImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * @return string + */ + public function getResources() + { + return $this->whichOneof("resources"); + } + + /** + * @return string + */ + public function getRuntime() + { + return $this->whichOneof("runtime"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InfrastructureSpec::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php new file mode 100644 index 000000000000..08481337d023 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php @@ -0,0 +1,146 @@ +google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + */ +class ComputeResources extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Size in GB of the disk. Default is 100 GB. + * + * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_size_gb = 0; + /** + * Optional. Total number of nodes in the sessions created for this + * environment. + * + * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_count = 0; + /** + * Optional. Max configurable nodes. + * If max_node_count > node_count, then auto-scaling is enabled. + * + * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_node_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $disk_size_gb + * Optional. Size in GB of the disk. Default is 100 GB. + * @type int $node_count + * Optional. Total number of nodes in the sessions created for this + * environment. + * @type int $max_node_count + * Optional. Max configurable nodes. + * If max_node_count > node_count, then auto-scaling is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Size in GB of the disk. Default is 100 GB. + * + * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Optional. Size in GB of the disk. Default is 100 GB. + * + * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Optional. Total number of nodes in the sessions created for this + * environment. + * + * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Optional. Total number of nodes in the sessions created for this + * environment. + * + * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Optional. Max configurable nodes. + * If max_node_count > node_count, then auto-scaling is enabled. + * + * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxNodeCount() + { + return $this->max_node_count; + } + + /** + * Optional. Max configurable nodes. + * If max_node_count > node_count, then auto-scaling is enabled. + * + * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->max_node_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComputeResources::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec_ComputeResources::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php new file mode 100644 index 000000000000..774611919e01 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php @@ -0,0 +1,200 @@ +google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + */ +class OsImageRuntime extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Dataplex Image version. + * + * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $image_version = ''; + /** + * Optional. List of Java jars to be included in the runtime environment. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * + * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $java_libraries; + /** + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * + * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $python_packages; + /** + * Optional. Spark properties to provide configuration for use in sessions + * created for this environment. The properties to set on daemon config + * files. Property keys are specified in `prefix:property` format. The + * prefix must be "spark". + * + * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_version + * Required. Dataplex Image version. + * @type array|\Google\Protobuf\Internal\RepeatedField $java_libraries + * Optional. List of Java jars to be included in the runtime environment. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * @type array|\Google\Protobuf\Internal\RepeatedField $python_packages + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * @type array|\Google\Protobuf\Internal\MapField $properties + * Optional. Spark properties to provide configuration for use in sessions + * created for this environment. The properties to set on daemon config + * files. Property keys are specified in `prefix:property` format. The + * prefix must be "spark". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Required. Dataplex Image version. + * + * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImageVersion() + { + return $this->image_version; + } + + /** + * Required. Dataplex Image version. + * + * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImageVersion($var) + { + GPBUtil::checkString($var, True); + $this->image_version = $var; + + return $this; + } + + /** + * Optional. List of Java jars to be included in the runtime environment. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * + * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJavaLibraries() + { + return $this->java_libraries; + } + + /** + * Optional. List of Java jars to be included in the runtime environment. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * + * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJavaLibraries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->java_libraries = $arr; + + return $this; + } + + /** + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * + * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPythonPackages() + { + return $this->python_packages; + } + + /** + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * + * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPythonPackages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->python_packages = $arr; + + return $this; + } + + /** + * Optional. Spark properties to provide configuration for use in sessions + * created for this environment. The properties to set on daemon config + * files. Property keys are specified in `prefix:property` format. The + * prefix must be "spark". + * + * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Optional. Spark properties to provide configuration for use in sessions + * created for this environment. The properties to set on daemon config + * files. Property keys are specified in `prefix:property` format. The + * prefix must be "spark". + * + * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->properties = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OsImageRuntime::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec_OsImageRuntime::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php new file mode 100644 index 000000000000..875f0566626c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php @@ -0,0 +1,134 @@ +google.cloud.dataplex.v1.Environment.SessionSpec + */ +class SessionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The idle time configuration of the session. The session will be + * auto-terminated at the end of this period. + * + * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_idle_duration = null; + /** + * Optional. If True, this causes sessions to be pre-created and available + * for faster startup to enable interactive exploration use-cases. This + * defaults to False to avoid additional billed charges. These can only be + * set to True for the environment with name set to "default", and with + * default configuration. + * + * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_fast_startup = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $max_idle_duration + * Optional. The idle time configuration of the session. The session will be + * auto-terminated at the end of this period. + * @type bool $enable_fast_startup + * Optional. If True, this causes sessions to be pre-created and available + * for faster startup to enable interactive exploration use-cases. This + * defaults to False to avoid additional billed charges. These can only be + * set to True for the environment with name set to "default", and with + * default configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The idle time configuration of the session. The session will be + * auto-terminated at the end of this period. + * + * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxIdleDuration() + { + return $this->max_idle_duration; + } + + public function hasMaxIdleDuration() + { + return isset($this->max_idle_duration); + } + + public function clearMaxIdleDuration() + { + unset($this->max_idle_duration); + } + + /** + * Optional. The idle time configuration of the session. The session will be + * auto-terminated at the end of this period. + * + * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxIdleDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_idle_duration = $var; + + return $this; + } + + /** + * Optional. If True, this causes sessions to be pre-created and available + * for faster startup to enable interactive exploration use-cases. This + * defaults to False to avoid additional billed charges. These can only be + * set to True for the environment with name set to "default", and with + * default configuration. + * + * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableFastStartup() + { + return $this->enable_fast_startup; + } + + /** + * Optional. If True, this causes sessions to be pre-created and available + * for faster startup to enable interactive exploration use-cases. This + * defaults to False to avoid additional billed charges. These can only be + * set to True for the environment with name set to "default", and with + * default configuration. + * + * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableFastStartup($var) + { + GPBUtil::checkBool($var); + $this->enable_fast_startup = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SessionSpec::class, \Google\Cloud\Dataplex\V1\Environment_SessionSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php new file mode 100644 index 000000000000..9a9d1e9ac250 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php @@ -0,0 +1,74 @@ +google.cloud.dataplex.v1.Environment.SessionStatus + */ +class SessionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Queries over sessions to mark whether the environment is + * currently active or not + * + * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $active + * Output only. Queries over sessions to mark whether the environment is + * currently active or not + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Queries over sessions to mark whether the environment is + * currently active or not + * + * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getActive() + { + return $this->active; + } + + /** + * Output only. Queries over sessions to mark whether the environment is + * currently active or not + * + * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setActive($var) + { + GPBUtil::checkBool($var); + $this->active = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SessionStatus::class, \Google\Cloud\Dataplex\V1\Environment_SessionStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php new file mode 100644 index 000000000000..a130f8dfdf58 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetAssetRequest + */ +class GetAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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 asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see + * {@see DataplexServiceClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetAssetRequest + * + * @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 asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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 asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php new file mode 100644 index 000000000000..f22038fef6a4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php @@ -0,0 +1,120 @@ +google.cloud.dataplex.v1.GetContentRequest + */ +class GetContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Specify content view to make a partial request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * Please see {@see ContentServiceClient::contentName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetContentRequest + * + * @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 content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @type int $view + * Optional. Specify content view to make a partial request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * 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 content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * + * 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. Specify content view to make a partial request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Specify content view to make a partial request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetContentRequest\ContentView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php new file mode 100644 index 000000000000..4ac623081ebd --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php @@ -0,0 +1,66 @@ +google.cloud.dataplex.v1.GetContentRequest.ContentView + */ +class ContentView +{ + /** + * Content view not specified. Defaults to BASIC. + * The API will default to the BASIC view. + * + * Generated from protobuf enum CONTENT_VIEW_UNSPECIFIED = 0; + */ + const CONTENT_VIEW_UNSPECIFIED = 0; + /** + * Will not return the `data_text` field. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Returns the complete proto. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::CONTENT_VIEW_UNSPECIFIED => 'CONTENT_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContentView::class, \Google\Cloud\Dataplex\V1\GetContentRequest_ContentView::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php new file mode 100644 index 000000000000..9da780a77c99 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetDataAttributeBindingRequest + */ +class GetDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * + * 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 DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * Please see {@see DataTaxonomyServiceClient::dataAttributeBindingName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetDataAttributeBindingRequest + * + * @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 DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * + * 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 DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php new file mode 100644 index 000000000000..9d7f615635de --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetDataAttributeRequest + */ +class GetDataAttributeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * 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 dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * Please see {@see DataTaxonomyServiceClient::dataAttributeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetDataAttributeRequest + * + * @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 dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * 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 dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php new file mode 100644 index 000000000000..6ae5f004f3c9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php @@ -0,0 +1,130 @@ +google.cloud.dataplex.v1.GetDataScanJobRequest + */ +class GetDataScanJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The resource name of the DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. Please see + * {@see DataScanServiceClient::dataScanJobName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetDataScanJobRequest + * + * @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 DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @type int $view + * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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 DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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. Select the DataScanJob view to return. Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetDataScanJobRequest\DataScanJobView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php new file mode 100644 index 000000000000..456b7b16e7a4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView + */ +class DataScanJobView +{ + /** + * The API will default to the `BASIC` view. + * + * Generated from protobuf enum DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; + */ + const DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; + /** + * Basic view that does not include *spec* and *result*. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum FULL = 10; + */ + const FULL = 10; + + private static $valueToName = [ + self::DATA_SCAN_JOB_VIEW_UNSPECIFIED => 'DATA_SCAN_JOB_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataScanJobView::class, \Google\Cloud\Dataplex\V1\GetDataScanJobRequest_DataScanJobView::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php new file mode 100644 index 000000000000..c3c75f71a955 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php @@ -0,0 +1,130 @@ +google.cloud.dataplex.v1.GetDataScanRequest + */ +class GetDataScanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Select the DataScan view to return. Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. Please see + * {@see DataScanServiceClient::dataScanName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetDataScanRequest + * + * @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 dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @type int $view + * Optional. Select the DataScan view to return. Defaults to `BASIC`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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 dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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. Select the DataScan view to return. Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Select the DataScan view to return. Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetDataScanRequest\DataScanView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php new file mode 100644 index 000000000000..2f5e406bef81 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.GetDataScanRequest.DataScanView + */ +class DataScanView +{ + /** + * The API will default to the `BASIC` view. + * + * Generated from protobuf enum DATA_SCAN_VIEW_UNSPECIFIED = 0; + */ + const DATA_SCAN_VIEW_UNSPECIFIED = 0; + /** + * Basic view that does not include *spec* and *result*. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum FULL = 10; + */ + const FULL = 10; + + private static $valueToName = [ + self::DATA_SCAN_VIEW_UNSPECIFIED => 'DATA_SCAN_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataScanView::class, \Google\Cloud\Dataplex\V1\GetDataScanRequest_DataScanView::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php new file mode 100644 index 000000000000..08d9be6edded --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetDataTaxonomyRequest + */ +class GetDataTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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 DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetDataTaxonomyRequest + * + * @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 DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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 DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php new file mode 100644 index 000000000000..ea9917eb51b9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php @@ -0,0 +1,124 @@ +google.cloud.dataplex.v1.GetEntityRequest + */ +class GetEntityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * Please see {@see MetadataServiceClient::entityName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetEntityRequest + * + * @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 entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * @type int $view + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * + * 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 entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * + * 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. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetEntityRequest\EntityView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php new file mode 100644 index 000000000000..ad4952b5751c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php @@ -0,0 +1,71 @@ +google.cloud.dataplex.v1.GetEntityRequest.EntityView + */ +class EntityView +{ + /** + * The API will default to the `BASIC` view. + * + * Generated from protobuf enum ENTITY_VIEW_UNSPECIFIED = 0; + */ + const ENTITY_VIEW_UNSPECIFIED = 0; + /** + * Minimal view that does not include the schema. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include basic information and schema. + * + * Generated from protobuf enum SCHEMA = 2; + */ + const SCHEMA = 2; + /** + * Include everything. Currently, this is the same as the SCHEMA view. + * + * Generated from protobuf enum FULL = 4; + */ + const FULL = 4; + + private static $valueToName = [ + self::ENTITY_VIEW_UNSPECIFIED => 'ENTITY_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::SCHEMA => 'SCHEMA', + self::FULL => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EntityView::class, \Google\Cloud\Dataplex\V1\GetEntityRequest_EntityView::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php new file mode 100644 index 000000000000..ac5c5f444540 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetEnvironmentRequest + */ +class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * + * 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 environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see + * {@see DataplexServiceClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetEnvironmentRequest + * + * @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 environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * + * 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 environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php new file mode 100644 index 000000000000..bd2193f0bdc7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetJobRequest + */ +class GetJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * + * 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 job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. Please see + * {@see DataplexServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetJobRequest + * + * @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 job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * + * 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 job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php new file mode 100644 index 000000000000..0258ba185430 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetLakeRequest + */ +class GetLakeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetLakeRequest + * + * @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 lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php new file mode 100644 index 000000000000..43b96cbd181b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php @@ -0,0 +1,96 @@ +google.cloud.dataplex.v1.GetPartitionRequest + */ +class GetPartitionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * + * 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 partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. Please see + * {@see MetadataServiceClient::partitionName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetPartitionRequest + * + * @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 partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * + * 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 partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php new file mode 100644 index 000000000000..47d121f37e2d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + * + * 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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. Please see + * {@see DataplexServiceClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetTaskRequest + * + * @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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + * + * 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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php new file mode 100644 index 000000000000..916e309dabbe --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php @@ -0,0 +1,86 @@ +google.cloud.dataplex.v1.GetZoneRequest + */ +class GetZoneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see + * {@see DataplexServiceClient::zoneName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\GetZoneRequest + * + * @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 zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php new file mode 100644 index 000000000000..62efaeb04fad --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php @@ -0,0 +1,149 @@ +google.cloud.dataplex.v1.GovernanceEvent + */ +class GovernanceEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The log message. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * The type of the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; + */ + protected $event_type = 0; + /** + * Entity resource information if the log event is associated with a + * specific entity. + * + * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; + */ + protected $entity = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * The log message. + * @type int $event_type + * The type of the event. + * @type \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity $entity + * Entity resource information if the log event is associated with a + * specific entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The type of the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; + * @return int + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * The type of the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; + * @param int $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\EventType::class); + $this->event_type = $var; + + return $this; + } + + /** + * Entity resource information if the log event is associated with a + * specific entity. + * + * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; + * @return \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Entity resource information if the log event is associated with a + * specific entity. + * + * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; + * @param \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity::class); + $this->entity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php new file mode 100644 index 000000000000..267d96437943 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php @@ -0,0 +1,112 @@ +google.cloud.dataplex.v1.GovernanceEvent.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * The Entity resource the log event is associated with. + * Format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` + * + * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { + */ + protected $entity = ''; + /** + * Type of entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; + */ + protected $entity_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity + * The Entity resource the log event is associated with. + * Format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` + * @type int $entity_type + * Type of entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The Entity resource the log event is associated with. + * Format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` + * + * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getEntity() + { + return $this->entity; + } + + /** + * The Entity resource the log event is associated with. + * Format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` + * + * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkString($var, True); + $this->entity = $var; + + return $this; + } + + /** + * Type of entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; + * @return int + */ + public function getEntityType() + { + return $this->entity_type; + } + + /** + * Type of entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; + * @param int $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity\EntityType::class); + $this->entity_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Entity::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_Entity::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php new file mode 100644 index 000000000000..a41babd15894 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType + */ +class EntityType +{ + /** + * An unspecified Entity type. + * + * Generated from protobuf enum ENTITY_TYPE_UNSPECIFIED = 0; + */ + const ENTITY_TYPE_UNSPECIFIED = 0; + /** + * Table entity type. + * + * Generated from protobuf enum TABLE = 1; + */ + const TABLE = 1; + /** + * Fileset entity type. + * + * Generated from protobuf enum FILESET = 2; + */ + const FILESET = 2; + + private static $valueToName = [ + self::ENTITY_TYPE_UNSPECIFIED => 'ENTITY_TYPE_UNSPECIFIED', + self::TABLE => 'TABLE', + self::FILESET => 'FILESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EntityType::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_Entity_EntityType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php new file mode 100644 index 000000000000..f12657954ff2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php @@ -0,0 +1,155 @@ +google.cloud.dataplex.v1.GovernanceEvent.EventType + */ +class EventType +{ + /** + * An unspecified event type. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * Resource IAM policy update event. + * + * Generated from protobuf enum RESOURCE_IAM_POLICY_UPDATE = 1; + */ + const RESOURCE_IAM_POLICY_UPDATE = 1; + /** + * BigQuery table create event. + * + * Generated from protobuf enum BIGQUERY_TABLE_CREATE = 2; + */ + const BIGQUERY_TABLE_CREATE = 2; + /** + * BigQuery table update event. + * + * Generated from protobuf enum BIGQUERY_TABLE_UPDATE = 3; + */ + const BIGQUERY_TABLE_UPDATE = 3; + /** + * BigQuery table delete event. + * + * Generated from protobuf enum BIGQUERY_TABLE_DELETE = 4; + */ + const BIGQUERY_TABLE_DELETE = 4; + /** + * BigQuery connection create event. + * + * Generated from protobuf enum BIGQUERY_CONNECTION_CREATE = 5; + */ + const BIGQUERY_CONNECTION_CREATE = 5; + /** + * BigQuery connection update event. + * + * Generated from protobuf enum BIGQUERY_CONNECTION_UPDATE = 6; + */ + const BIGQUERY_CONNECTION_UPDATE = 6; + /** + * BigQuery connection delete event. + * + * Generated from protobuf enum BIGQUERY_CONNECTION_DELETE = 7; + */ + const BIGQUERY_CONNECTION_DELETE = 7; + /** + * BigQuery taxonomy created. + * + * Generated from protobuf enum BIGQUERY_TAXONOMY_CREATE = 10; + */ + const BIGQUERY_TAXONOMY_CREATE = 10; + /** + * BigQuery policy tag created. + * + * Generated from protobuf enum BIGQUERY_POLICY_TAG_CREATE = 11; + */ + const BIGQUERY_POLICY_TAG_CREATE = 11; + /** + * BigQuery policy tag deleted. + * + * Generated from protobuf enum BIGQUERY_POLICY_TAG_DELETE = 12; + */ + const BIGQUERY_POLICY_TAG_DELETE = 12; + /** + * BigQuery set iam policy for policy tag. + * + * Generated from protobuf enum BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; + */ + const BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; + /** + * Access policy update event. + * + * Generated from protobuf enum ACCESS_POLICY_UPDATE = 14; + */ + const ACCESS_POLICY_UPDATE = 14; + /** + * Number of resources matched with particular Query. + * + * Generated from protobuf enum GOVERNANCE_RULE_MATCHED_RESOURCES = 15; + */ + const GOVERNANCE_RULE_MATCHED_RESOURCES = 15; + /** + * Rule processing exceeds the allowed limit. + * + * Generated from protobuf enum GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; + */ + const GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; + /** + * Rule processing errors. + * + * Generated from protobuf enum GOVERNANCE_RULE_ERRORS = 17; + */ + const GOVERNANCE_RULE_ERRORS = 17; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::RESOURCE_IAM_POLICY_UPDATE => 'RESOURCE_IAM_POLICY_UPDATE', + self::BIGQUERY_TABLE_CREATE => 'BIGQUERY_TABLE_CREATE', + self::BIGQUERY_TABLE_UPDATE => 'BIGQUERY_TABLE_UPDATE', + self::BIGQUERY_TABLE_DELETE => 'BIGQUERY_TABLE_DELETE', + self::BIGQUERY_CONNECTION_CREATE => 'BIGQUERY_CONNECTION_CREATE', + self::BIGQUERY_CONNECTION_UPDATE => 'BIGQUERY_CONNECTION_UPDATE', + self::BIGQUERY_CONNECTION_DELETE => 'BIGQUERY_CONNECTION_DELETE', + self::BIGQUERY_TAXONOMY_CREATE => 'BIGQUERY_TAXONOMY_CREATE', + self::BIGQUERY_POLICY_TAG_CREATE => 'BIGQUERY_POLICY_TAG_CREATE', + self::BIGQUERY_POLICY_TAG_DELETE => 'BIGQUERY_POLICY_TAG_DELETE', + self::BIGQUERY_POLICY_TAG_SET_IAM_POLICY => 'BIGQUERY_POLICY_TAG_SET_IAM_POLICY', + self::ACCESS_POLICY_UPDATE => 'ACCESS_POLICY_UPDATE', + self::GOVERNANCE_RULE_MATCHED_RESOURCES => 'GOVERNANCE_RULE_MATCHED_RESOURCES', + self::GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS => 'GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS', + self::GOVERNANCE_RULE_ERRORS => 'GOVERNANCE_RULE_ERRORS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_EventType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php new file mode 100644 index 000000000000..d01c70cc3595 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php @@ -0,0 +1,483 @@ +google.cloud.dataplex.v1.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the job, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the job. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the job was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time when the job ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Execution state for the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The number of times the job has been retried (excluding the + * initial attempt). + * + * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $retry_count = 0; + /** + * Output only. The underlying service running a job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service = 0; + /** + * Output only. The full resource name for the job run under a particular + * service. + * + * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_job = ''; + /** + * Output only. Additional information about the current state. + * + * Generated from protobuf field string message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $message = ''; + /** + * Output only. User-defined labels for the task. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $labels; + /** + * Output only. Job execution trigger. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $trigger = 0; + /** + * Output only. Spec related to how a task is executed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $execution_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the job, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * @type string $uid + * Output only. System generated globally unique ID for the job. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time when the job was started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time when the job ended. + * @type int $state + * Output only. Execution state for the job. + * @type int $retry_count + * Output only. The number of times the job has been retried (excluding the + * initial attempt). + * @type int $service + * Output only. The underlying service running a job. + * @type string $service_job + * Output only. The full resource name for the job run under a particular + * service. + * @type string $message + * Output only. Additional information about the current state. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Output only. User-defined labels for the task. + * @type int $trigger + * Output only. Job execution trigger. + * @type \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $execution_spec + * Output only. Spec related to how a task is executed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the job, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the job, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the job. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the job. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the job was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The time when the job was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time when the job ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time when the job ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Execution state for the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Execution state for the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The number of times the job has been retried (excluding the + * initial attempt). + * + * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRetryCount() + { + return $this->retry_count; + } + + /** + * Output only. The number of times the job has been retried (excluding the + * initial attempt). + * + * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRetryCount($var) + { + GPBUtil::checkUint32($var); + $this->retry_count = $var; + + return $this; + } + + /** + * Output only. The underlying service running a job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getService() + { + return $this->service; + } + + /** + * Output only. The underlying service running a job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\Service::class); + $this->service = $var; + + return $this; + } + + /** + * Output only. The full resource name for the job run under a particular + * service. + * + * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceJob() + { + return $this->service_job; + } + + /** + * Output only. The full resource name for the job run under a particular + * service. + * + * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceJob($var) + { + GPBUtil::checkString($var, True); + $this->service_job = $var; + + return $this; + } + + /** + * Output only. Additional information about the current state. + * + * Generated from protobuf field string message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Output only. Additional information about the current state. + * + * Generated from protobuf field string message = 9 [(.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. User-defined labels for the task. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Output only. User-defined labels for the task. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Job execution trigger. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTrigger() + { + return $this->trigger; + } + + /** + * Output only. Job execution trigger. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * Output only. Spec related to how a task is executed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Task\ExecutionSpec|null + */ + public function getExecutionSpec() + { + return $this->execution_spec; + } + + public function hasExecutionSpec() + { + return isset($this->execution_spec); + } + + public function clearExecutionSpec() + { + unset($this->execution_spec); + } + + /** + * Output only. Spec related to how a task is executed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $var + * @return $this + */ + public function setExecutionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionSpec::class); + $this->execution_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php new file mode 100644 index 000000000000..08e0a6e08b68 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php @@ -0,0 +1,55 @@ +google.cloud.dataplex.v1.Job.Service + */ +class Service +{ + /** + * Service used to run the job is unspecified. + * + * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; + */ + const SERVICE_UNSPECIFIED = 0; + /** + * Dataproc service is used to run this job. + * + * Generated from protobuf enum DATAPROC = 1; + */ + const DATAPROC = 1; + + private static $valueToName = [ + self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', + self::DATAPROC => 'DATAPROC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Service::class, \Google\Cloud\Dataplex\V1\Job_Service::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php new file mode 100644 index 000000000000..52ab56038e03 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php @@ -0,0 +1,90 @@ +google.cloud.dataplex.v1.Job.State + */ +class State +{ + /** + * The job state is unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The job is running. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The job is cancelling. + * + * Generated from protobuf enum CANCELLING = 2; + */ + const CANCELLING = 2; + /** + * The job cancellation was successful. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The job completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * The job is no longer running due to an error. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The job was cancelled outside of Dataplex. + * + * Generated from protobuf enum ABORTED = 6; + */ + const ABORTED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::ABORTED => 'ABORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\Job_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php new file mode 100644 index 000000000000..9a1d83d03c54 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php @@ -0,0 +1,65 @@ +google.cloud.dataplex.v1.Job.Trigger + */ +class Trigger +{ + /** + * The trigger is unspecified. + * + * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; + */ + const TRIGGER_UNSPECIFIED = 0; + /** + * The job was triggered by Dataplex based on trigger spec from task + * definition. + * + * Generated from protobuf enum TASK_CONFIG = 1; + */ + const TASK_CONFIG = 1; + /** + * The job was triggered by the explicit call of Task API. + * + * Generated from protobuf enum RUN_REQUEST = 2; + */ + const RUN_REQUEST = 2; + + private static $valueToName = [ + self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', + self::TASK_CONFIG => 'TASK_CONFIG', + self::RUN_REQUEST => 'RUN_REQUEST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Trigger::class, \Google\Cloud\Dataplex\V1\Job_Trigger::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php new file mode 100644 index 000000000000..63a1762204e0 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php @@ -0,0 +1,394 @@ +google.cloud.dataplex.v1.JobEvent + */ +class JobEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The log message. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * The unique id identifying the job. + * + * Generated from protobuf field string job_id = 2; + */ + protected $job_id = ''; + /** + * The time when the job started running. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * The time when the job ended running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + */ + protected $end_time = null; + /** + * The job state on completion. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; + */ + protected $state = 0; + /** + * The number of retries. + * + * Generated from protobuf field int32 retries = 6; + */ + protected $retries = 0; + /** + * The type of the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; + */ + protected $type = 0; + /** + * The service used to execute the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; + */ + protected $service = 0; + /** + * The reference to the job within the service. + * + * Generated from protobuf field string service_job = 9; + */ + protected $service_job = ''; + /** + * Job execution trigger. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + */ + protected $execution_trigger = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * The log message. + * @type string $job_id + * The unique id identifying the job. + * @type \Google\Protobuf\Timestamp $start_time + * The time when the job started running. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the job ended running. + * @type int $state + * The job state on completion. + * @type int $retries + * The number of retries. + * @type int $type + * The type of the job. + * @type int $service + * The service used to execute the job. + * @type string $service_job + * The reference to the job within the service. + * @type int $execution_trigger + * Job execution trigger. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The unique id identifying the job. + * + * Generated from protobuf field string job_id = 2; + * @return string + */ + public function getJobId() + { + return $this->job_id; + } + + /** + * The unique id identifying the job. + * + * Generated from protobuf field string job_id = 2; + * @param string $var + * @return $this + */ + public function setJobId($var) + { + GPBUtil::checkString($var, True); + $this->job_id = $var; + + return $this; + } + + /** + * The time when the job started running. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time when the job started running. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time when the job ended running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time when the job ended running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The job state on completion. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The job state on completion. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\State::class); + $this->state = $var; + + return $this; + } + + /** + * The number of retries. + * + * Generated from protobuf field int32 retries = 6; + * @return int + */ + public function getRetries() + { + return $this->retries; + } + + /** + * The number of retries. + * + * Generated from protobuf field int32 retries = 6; + * @param int $var + * @return $this + */ + public function setRetries($var) + { + GPBUtil::checkInt32($var); + $this->retries = $var; + + return $this; + } + + /** + * The type of the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The service used to execute the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; + * @return int + */ + public function getService() + { + return $this->service; + } + + /** + * The service used to execute the job. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; + * @param int $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\Service::class); + $this->service = $var; + + return $this; + } + + /** + * The reference to the job within the service. + * + * Generated from protobuf field string service_job = 9; + * @return string + */ + public function getServiceJob() + { + return $this->service_job; + } + + /** + * The reference to the job within the service. + * + * Generated from protobuf field string service_job = 9; + * @param string $var + * @return $this + */ + public function setServiceJob($var) + { + GPBUtil::checkString($var, True); + $this->service_job = $var; + + return $this; + } + + /** + * Job execution trigger. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * @return int + */ + public function getExecutionTrigger() + { + return $this->execution_trigger; + } + + /** + * Job execution trigger. + * + * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * @param int $var + * @return $this + */ + public function setExecutionTrigger($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\ExecutionTrigger::class); + $this->execution_trigger = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php new file mode 100644 index 000000000000..57c73028f4ff --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php @@ -0,0 +1,65 @@ +google.cloud.dataplex.v1.JobEvent.ExecutionTrigger + */ +class ExecutionTrigger +{ + /** + * The job execution trigger is unspecified. + * + * Generated from protobuf enum EXECUTION_TRIGGER_UNSPECIFIED = 0; + */ + const EXECUTION_TRIGGER_UNSPECIFIED = 0; + /** + * The job was triggered by Dataplex based on trigger spec from task + * definition. + * + * Generated from protobuf enum TASK_CONFIG = 1; + */ + const TASK_CONFIG = 1; + /** + * The job was triggered by the explicit call of Task API. + * + * Generated from protobuf enum RUN_REQUEST = 2; + */ + const RUN_REQUEST = 2; + + private static $valueToName = [ + self::EXECUTION_TRIGGER_UNSPECIFIED => 'EXECUTION_TRIGGER_UNSPECIFIED', + self::TASK_CONFIG => 'TASK_CONFIG', + self::RUN_REQUEST => 'RUN_REQUEST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionTrigger::class, \Google\Cloud\Dataplex\V1\JobEvent_ExecutionTrigger::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php new file mode 100644 index 000000000000..14aa09b7b03b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php @@ -0,0 +1,57 @@ +google.cloud.dataplex.v1.JobEvent.Service + */ +class Service +{ + /** + * Unspecified service. + * + * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; + */ + const SERVICE_UNSPECIFIED = 0; + /** + * Cloud Dataproc. + * + * Generated from protobuf enum DATAPROC = 1; + */ + const DATAPROC = 1; + + private static $valueToName = [ + self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', + self::DATAPROC => 'DATAPROC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Service::class, \Google\Cloud\Dataplex\V1\JobEvent_Service::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php new file mode 100644 index 000000000000..11e855f84d74 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php @@ -0,0 +1,78 @@ +google.cloud.dataplex.v1.JobEvent.State + */ +class State +{ + /** + * Unspecified job state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Job successfully completed. + * + * Generated from protobuf enum SUCCEEDED = 1; + */ + const SUCCEEDED = 1; + /** + * Job was unsuccessful. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * Job was cancelled by the user. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * Job was cancelled or aborted via the service executing the job. + * + * Generated from protobuf enum ABORTED = 4; + */ + const ABORTED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + self::ABORTED => 'ABORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\JobEvent_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php new file mode 100644 index 000000000000..b30325d652ae --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.JobEvent.Type + */ +class Type +{ + /** + * Unspecified job type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Spark jobs. + * + * Generated from protobuf enum SPARK = 1; + */ + const SPARK = 1; + /** + * Notebook jobs. + * + * Generated from protobuf enum NOTEBOOK = 2; + */ + const NOTEBOOK = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::SPARK => 'SPARK', + self::NOTEBOOK => 'NOTEBOOK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Dataplex\V1\JobEvent_Type::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php new file mode 100644 index 000000000000..29862ba39797 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php @@ -0,0 +1,518 @@ +google.cloud.dataplex.v1.Lake + */ +class Lake extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. System generated globally unique ID for the lake. This ID will + * be different if the lake is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the lake 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 when the lake was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User-defined labels for the lake. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of the lake. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Current state of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Service account associated with this lake. This service + * account must be authorized to access or operate on resources managed by the + * lake. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account = ''; + /** + * Optional. Settings to manage lake and Dataproc Metastore service instance + * association. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metastore = null; + /** + * Output only. Aggregated status of the underlying assets of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_status = null; + /** + * Output only. Metastore status of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metastore_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @type string $display_name + * Optional. User friendly display name. + * @type string $uid + * Output only. System generated globally unique ID for the lake. This ID will + * be different if the lake is deleted and re-created with the same name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the lake was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the lake was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for the lake. + * @type string $description + * Optional. Description of the lake. + * @type int $state + * Output only. Current state of the lake. + * @type string $service_account + * Output only. Service account associated with this lake. This service + * account must be authorized to access or operate on resources managed by the + * lake. + * @type \Google\Cloud\Dataplex\V1\Lake\Metastore $metastore + * Optional. Settings to manage lake and Dataproc Metastore service instance + * association. + * @type \Google\Cloud\Dataplex\V1\AssetStatus $asset_status + * Output only. Aggregated status of the underlying assets of the lake. + * @type \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus $metastore_status + * Output only. Metastore status of the lake. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the lake, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the lake. This ID will + * be different if the lake is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the lake. This ID will + * be different if the lake is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the lake 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 when the lake 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 when the lake 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 when the lake 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; + } + + /** + * Optional. User-defined labels for the lake. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for the lake. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Description of the lake. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the lake. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Current state of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Service account associated with this lake. This service + * account must be authorized to access or operate on resources managed by the + * lake. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. Service account associated with this lake. This service + * account must be authorized to access or operate on resources managed by the + * lake. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. Settings to manage lake and Dataproc Metastore service instance + * association. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Lake\Metastore|null + */ + public function getMetastore() + { + return $this->metastore; + } + + public function hasMetastore() + { + return isset($this->metastore); + } + + public function clearMetastore() + { + unset($this->metastore); + } + + /** + * Optional. Settings to manage lake and Dataproc Metastore service instance + * association. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Lake\Metastore $var + * @return $this + */ + public function setMetastore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake\Metastore::class); + $this->metastore = $var; + + return $this; + } + + /** + * Output only. Aggregated status of the underlying assets of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\AssetStatus|null + */ + public function getAssetStatus() + { + return $this->asset_status; + } + + public function hasAssetStatus() + { + return isset($this->asset_status); + } + + public function clearAssetStatus() + { + unset($this->asset_status); + } + + /** + * Output only. Aggregated status of the underlying assets of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\AssetStatus $var + * @return $this + */ + public function setAssetStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AssetStatus::class); + $this->asset_status = $var; + + return $this; + } + + /** + * Output only. Metastore status of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus|null + */ + public function getMetastoreStatus() + { + return $this->metastore_status; + } + + public function hasMetastoreStatus() + { + return isset($this->metastore_status); + } + + public function clearMetastoreStatus() + { + unset($this->metastore_status); + } + + /** + * Output only. Metastore status of the lake. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus $var + * @return $this + */ + public function setMetastoreStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus::class); + $this->metastore_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php new file mode 100644 index 000000000000..3af3e06ed129 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php @@ -0,0 +1,82 @@ +google.cloud.dataplex.v1.Lake.Metastore + */ +class Metastore extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A relative reference to the Dataproc Metastore + * (https://cloud.google.com/dataproc-metastore/docs) service associated + * with the lake: + * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Optional. A relative reference to the Dataproc Metastore + * (https://cloud.google.com/dataproc-metastore/docs) service associated + * with the lake: + * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A relative reference to the Dataproc Metastore + * (https://cloud.google.com/dataproc-metastore/docs) service associated + * with the lake: + * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Optional. A relative reference to the Dataproc Metastore + * (https://cloud.google.com/dataproc-metastore/docs) service associated + * with the lake: + * `projects/{project_id}/locations/{location_id}/services/{service_id}` + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Metastore::class, \Google\Cloud\Dataplex\V1\Lake_Metastore::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php new file mode 100644 index 000000000000..26a7a00c8ad9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php @@ -0,0 +1,182 @@ +google.cloud.dataplex.v1.Lake.MetastoreStatus + */ +class MetastoreStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Current state of association. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; + */ + protected $state = 0; + /** + * Additional information about the current status. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Last update time of the metastore status of the lake. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * The URI of the endpoint used to access the Metastore service. + * + * Generated from protobuf field string endpoint = 4; + */ + protected $endpoint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Current state of association. + * @type string $message + * Additional information about the current status. + * @type \Google\Protobuf\Timestamp $update_time + * Last update time of the metastore status of the lake. + * @type string $endpoint + * The URI of the endpoint used to access the Metastore service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Current state of association. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Current state of association. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Additional information about the current status. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the current status. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Last update time of the metastore status of the lake. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @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); + } + + /** + * Last update time of the metastore status of the lake. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The URI of the endpoint used to access the Metastore service. + * + * Generated from protobuf field string endpoint = 4; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * The URI of the endpoint used to access the Metastore service. + * + * Generated from protobuf field string endpoint = 4; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetastoreStatus::class, \Google\Cloud\Dataplex\V1\Lake_MetastoreStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php new file mode 100644 index 000000000000..c80f36501c7e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php @@ -0,0 +1,78 @@ +google.cloud.dataplex.v1.Lake.MetastoreStatus.State + */ +class State +{ + /** + * Unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * A Metastore service instance is not associated with the lake. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * A Metastore service instance is attached to the lake. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Attach/detach is in progress. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Attach/detach could not be done due to errors. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::NONE => 'NONE', + self::READY => 'READY', + self::UPDATING => 'UPDATING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Dataplex\V1\Lake_MetastoreStatus_State::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php new file mode 100644 index 000000000000..fe396fe3f398 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListActionsResponse + */ +class ListActionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Actions under the given parent lake/zone/asset. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; + */ + private $actions; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Action>|\Google\Protobuf\Internal\RepeatedField $actions + * Actions under the given parent lake/zone/asset. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Actions under the given parent lake/zone/asset. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActions() + { + return $this->actions; + } + + /** + * Actions under the given parent lake/zone/asset. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; + * @param array<\Google\Cloud\Dataplex\V1\Action>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Action::class); + $this->actions = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php new file mode 100644 index 000000000000..ac5d5fa802be --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php @@ -0,0 +1,174 @@ +google.cloud.dataplex.v1.ListAssetActionsRequest + */ +class ListAssetActionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` 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 = ''; + + /** + * @param string $parent Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see + * {@see DataplexServiceClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListAssetActionsRequest + * + * @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 name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @type int $page_size + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` must match the call that provided + * the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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 name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * + * 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. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` 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. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` 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; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php new file mode 100644 index 000000000000..7509ce399872 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php @@ -0,0 +1,242 @@ +google.cloud.dataplex.v1.ListAssetsRequest + */ +class ListAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets 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. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see + * {@see DataplexServiceClient::zoneName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListAssetsRequest + * + * @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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @type int $page_size + * Optional. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets 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. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets 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. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` 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. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php new file mode 100644 index 000000000000..44d12c30ab42 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListAssetsResponse + */ +class ListAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Asset under the given parent zone. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; + */ + private $assets; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets + * Asset under the given parent zone. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Asset under the given parent zone. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssets() + { + return $this->assets; + } + + /** + * Asset under the given parent zone. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; + * @param array<\Google\Cloud\Dataplex\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Asset::class); + $this->assets = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php new file mode 100644 index 000000000000..df25d8b1b3b8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php @@ -0,0 +1,232 @@ +google.cloud.dataplex.v1.ListContentRequest + */ +class ListContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content 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. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` 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. Filter request. Filters are case-sensitive. + * The following formats are supported: + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * Please see {@see ContentServiceClient::lakeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListContentRequest + * + * @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 name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @type int $page_size + * Optional. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + * @type string $filter + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * + * 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 name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * + * 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. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content 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. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content 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. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` 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. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` 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. Filter request. Filters are case-sensitive. + * The following formats are supported: + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php new file mode 100644 index 000000000000..b66d35eec61d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListContentResponse + */ +class ListContentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Content under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; + */ + private $content; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Content>|\Google\Protobuf\Internal\RepeatedField $content + * Content under the given parent lake. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); + parent::__construct($data); + } + + /** + * Content under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContent() + { + return $this->content; + } + + /** + * Content under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; + * @param array<\Google\Cloud\Dataplex\V1\Content>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Content::class); + $this->content = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php new file mode 100644 index 000000000000..8e0d0c433968 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php @@ -0,0 +1,262 @@ +google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + */ +class ListDataAttributeBindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings 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. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` 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. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + * Please see {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListDataAttributeBindingsRequest + * + * @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 name of the Location: + * projects/{project_number}/locations/{location_id} + * @type int $page_size + * Optional. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` must match the + * call that provided the page token. + * @type string $filter + * Optional. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + * + * 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 name of the Location: + * projects/{project_number}/locations/{location_id} + * + * 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. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings 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. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings 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. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` 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. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` 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. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php new file mode 100644 index 000000000000..f4d75e557b7c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php @@ -0,0 +1,139 @@ +google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + */ +class ListDataAttributeBindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataAttributeBindings under the given parent Location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + */ + private $data_attribute_bindings; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + */ + private $unreachable_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\DataAttributeBinding>|\Google\Protobuf\Internal\RepeatedField $data_attribute_bindings + * DataAttributeBindings under the given parent Location. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * DataAttributeBindings under the given parent Location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataAttributeBindings() + { + return $this->data_attribute_bindings; + } + + /** + * DataAttributeBindings under the given parent Location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * @param array<\Google\Cloud\Dataplex\V1\DataAttributeBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataAttributeBindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); + $this->data_attribute_bindings = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachableLocations() + { + return $this->unreachable_locations; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachableLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable_locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php new file mode 100644 index 000000000000..94503d7719b2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php @@ -0,0 +1,246 @@ +google.cloud.dataplex.v1.ListDataAttributesRequest + */ +class ListDataAttributesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * 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. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListDataAttributesRequest + * + * @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 name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @type int $page_size + * Optional. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` must match the call that + * provided the page token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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 name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * + * 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. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * 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. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * 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. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` 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. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php new file mode 100644 index 000000000000..393dea1f5b47 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php @@ -0,0 +1,139 @@ +google.cloud.dataplex.v1.ListDataAttributesResponse + */ +class ListDataAttributesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataAttributes under the given parent DataTaxonomy. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + private $data_attributes; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + */ + private $unreachable_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\DataAttribute>|\Google\Protobuf\Internal\RepeatedField $data_attributes + * DataAttributes under the given parent DataTaxonomy. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * DataAttributes under the given parent DataTaxonomy. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataAttributes() + { + return $this->data_attributes; + } + + /** + * DataAttributes under the given parent DataTaxonomy. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + * @param array<\Google\Cloud\Dataplex\V1\DataAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttribute::class); + $this->data_attributes = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachableLocations() + { + return $this->unreachable_locations; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachableLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable_locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php new file mode 100644 index 000000000000..aec91a29af33 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php @@ -0,0 +1,266 @@ +google.cloud.dataplex.v1.ListDataScanJobsRequest + */ +class ListDataScanJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs 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. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` 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. An expression for filtering the results of the ListDataScanJobs + * request. + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * Allowed fields are: + * - `start_time` + * - `end_time` + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. Please see + * {@see DataScanServiceClient::dataScanName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListDataScanJobsRequest + * + * @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 name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @type int $page_size + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + * @type string $filter + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * Allowed fields are: + * - `start_time` + * - `end_time` + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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 name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs 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. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs 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. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` 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. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` 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. An expression for filtering the results of the ListDataScanJobs + * request. + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * Allowed fields are: + * - `start_time` + * - `end_time` + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * Allowed fields are: + * - `start_time` + * - `end_time` + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php new file mode 100644 index 000000000000..0768d4f37321 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListDataScanJobsResponse + */ +class ListDataScanJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataScanJobs (`BASIC` view only) under a given dataScan. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; + */ + private $data_scan_jobs; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\DataScanJob>|\Google\Protobuf\Internal\RepeatedField $data_scan_jobs + * DataScanJobs (`BASIC` view only) under a given dataScan. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * DataScanJobs (`BASIC` view only) under a given dataScan. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataScanJobs() + { + return $this->data_scan_jobs; + } + + /** + * DataScanJobs (`BASIC` view only) under a given dataScan. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; + * @param array<\Google\Cloud\Dataplex\V1\DataScanJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataScanJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataScanJob::class); + $this->data_scan_jobs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php new file mode 100644 index 000000000000..f17be758d891 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php @@ -0,0 +1,256 @@ +google.cloud.dataplex.v1.ListDataScansRequest + */ +class ListDataScansRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans 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. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. Please see + * {@see DataScanServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListDataScansRequest + * + * @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 name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @type int $page_size + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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 name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * 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. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans 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. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans 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. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` 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. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php new file mode 100644 index 000000000000..5dd91ea1531c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php @@ -0,0 +1,139 @@ +google.cloud.dataplex.v1.ListDataScansResponse + */ +class ListDataScansResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataScans (`BASIC` view only) under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; + */ + private $data_scans; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\DataScan>|\Google\Protobuf\Internal\RepeatedField $data_scans + * DataScans (`BASIC` view only) under the given parent location. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * DataScans (`BASIC` view only) under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataScans() + { + return $this->data_scans; + } + + /** + * DataScans (`BASIC` view only) under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; + * @param array<\Google\Cloud\Dataplex\V1\DataScan>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataScans($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataScan::class); + $this->data_scans = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php new file mode 100644 index 000000000000..655454555997 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php @@ -0,0 +1,251 @@ +google.cloud.dataplex.v1.ListDataTaxonomiesRequest + */ +class ListDataTaxonomiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * 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. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. Please see + * {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListDataTaxonomiesRequest + * + * @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 name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @type int $page_size + * Optional. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` must match the call that + * provided the page token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * 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 name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * + * 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. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * 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. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * 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. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` 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. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php new file mode 100644 index 000000000000..afec40a23ba1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php @@ -0,0 +1,139 @@ +google.cloud.dataplex.v1.ListDataTaxonomiesResponse + */ +class ListDataTaxonomiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataTaxonomies under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + private $data_taxonomies; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + */ + private $unreachable_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\DataTaxonomy>|\Google\Protobuf\Internal\RepeatedField $data_taxonomies + * DataTaxonomies under the given parent location. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * DataTaxonomies under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataTaxonomies() + { + return $this->data_taxonomies; + } + + /** + * DataTaxonomies under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + * @param array<\Google\Cloud\Dataplex\V1\DataTaxonomy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataTaxonomies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); + $this->data_taxonomies = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachableLocations() + { + return $this->unreachable_locations; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachableLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable_locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php new file mode 100644 index 000000000000..307bb3a83e46 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php @@ -0,0 +1,270 @@ +google.cloud.dataplex.v1.ListEntitiesRequest + */ +class ListEntitiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Specify the entity view to make a partial list request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $view = 0; + /** + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see + * {@see MetadataServiceClient::zoneName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListEntitiesRequest + * + * @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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @type int $view + * Required. Specify the entity view to make a partial list request. + * @type int $page_size + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + * @type string $page_token + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @type string $filter + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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. Specify the entity view to make a partial list request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Required. Specify the entity view to make a partial list request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\ListEntitiesRequest\EntityView::class); + $this->view = $var; + + return $this; + } + + /** + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 4 [(.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. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php new file mode 100644 index 000000000000..4a09aa0866d5 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php @@ -0,0 +1,65 @@ +google.cloud.dataplex.v1.ListEntitiesRequest.EntityView + */ +class EntityView +{ + /** + * The default unset value. Return both table and fileset entities + * if unspecified. + * + * Generated from protobuf enum ENTITY_VIEW_UNSPECIFIED = 0; + */ + const ENTITY_VIEW_UNSPECIFIED = 0; + /** + * Only list table entities. + * + * Generated from protobuf enum TABLES = 1; + */ + const TABLES = 1; + /** + * Only list fileset entities. + * + * Generated from protobuf enum FILESETS = 2; + */ + const FILESETS = 2; + + private static $valueToName = [ + self::ENTITY_VIEW_UNSPECIFIED => 'ENTITY_VIEW_UNSPECIFIED', + self::TABLES => 'TABLES', + self::FILESETS => 'FILESETS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EntityView::class, \Google\Cloud\Dataplex\V1\ListEntitiesRequest_EntityView::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php new file mode 100644 index 000000000000..a7fa7797c537 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListEntitiesResponse + */ +class ListEntitiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Entities in the specified parent zone. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; + */ + private $entities; + /** + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Entities in the specified parent zone. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Entities in the specified parent zone. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Entities in the specified parent zone. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; + * @param array<\Google\Cloud\Dataplex\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php new file mode 100644 index 000000000000..cee8197a07b9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php @@ -0,0 +1,246 @@ +google.cloud.dataplex.v1.ListEnvironmentsRequest + */ +class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments 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. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListEnvironmentsRequest + * + * @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 name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @type int $page_size + * Optional. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` must match the call that provided + * the page token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * + * 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. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments 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. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments 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. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` 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. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php new file mode 100644 index 000000000000..ffc31f6b154e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListEnvironmentsResponse + */ +class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Environments under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; + */ + private $environments; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments + * Environments under the given parent lake. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Environments under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvironments() + { + return $this->environments; + } + + /** + * Environments under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; + * @param array<\Google\Cloud\Dataplex\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Environment::class); + $this->environments = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php new file mode 100644 index 000000000000..0e4b9990461a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php @@ -0,0 +1,174 @@ +google.cloud.dataplex.v1.ListJobsRequest + */ +class ListJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs 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. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` 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 = ''; + + /** + * @param string $parent Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see + * {@see DataplexServiceClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListJobsRequest + * + * @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 name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @type int $page_size + * Optional. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * + * 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 name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * + * 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. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs 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. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs 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. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` 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. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` 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; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php new file mode 100644 index 000000000000..30ca6bba5fe7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListJobsResponse + */ +class ListJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Jobs under a given task. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; + */ + private $jobs; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * Jobs under a given task. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Jobs under a given task. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Jobs under a given task. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; + * @param array<\Google\Cloud\Dataplex\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php new file mode 100644 index 000000000000..d73c320fe476 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php @@ -0,0 +1,174 @@ +google.cloud.dataplex.v1.ListLakeActionsRequest + */ +class ListLakeActionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` 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 = ''; + + /** + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListLakeActionsRequest + * + * @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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @type int $page_size + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` must match the call that provided + * the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` 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. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` 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; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php new file mode 100644 index 000000000000..0e9ac3478e75 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php @@ -0,0 +1,243 @@ +google.cloud.dataplex.v1.ListLakesRequest + */ +class ListLakesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes 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. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. Please see + * {@see DataplexServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListLakesRequest + * + * @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 name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @type int $page_size + * Optional. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * 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 name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * 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. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes 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. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes 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. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` 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. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php new file mode 100644 index 000000000000..8cd74bcf1dc4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php @@ -0,0 +1,139 @@ +google.cloud.dataplex.v1.ListLakesResponse + */ +class ListLakesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Lakes under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; + */ + private $lakes; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + */ + private $unreachable_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Lake>|\Google\Protobuf\Internal\RepeatedField $lakes + * Lakes under the given parent location. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Lakes under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLakes() + { + return $this->lakes; + } + + /** + * Lakes under the given parent location. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; + * @param array<\Google\Cloud\Dataplex\V1\Lake>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLakes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Lake::class); + $this->lakes = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachableLocations() + { + return $this->unreachable_locations; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachableLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable_locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php new file mode 100644 index 000000000000..4c40edf47281 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php @@ -0,0 +1,268 @@ +google.cloud.dataplex.v1.ListPartitionsRequest + */ +class ListPartitionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` 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. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * **Notes:** + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see + * {@see MetadataServiceClient::entityName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListPartitionsRequest + * + * @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 name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @type int $page_size + * Optional. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + * @type string $page_token + * Optional. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` must match the call that provided + * the page token. + * @type string $filter + * Optional. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * **Notes:** + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * 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 name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * + * 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. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + * + * 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. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` 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. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` 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. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * **Notes:** + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * **Notes:** + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php new file mode 100644 index 000000000000..06a68cc7020c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListPartitionsResponse + */ +class ListPartitionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Partitions under the specified parent entity. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; + */ + private $partitions; + /** + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Partition>|\Google\Protobuf\Internal\RepeatedField $partitions + * Partitions under the specified parent entity. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Partitions under the specified parent entity. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartitions() + { + return $this->partitions; + } + + /** + * Partitions under the specified parent entity. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; + * @param array<\Google\Cloud\Dataplex\V1\Partition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Partition::class); + $this->partitions = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no + * remaining results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php new file mode 100644 index 000000000000..be94f5019e56 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php @@ -0,0 +1,236 @@ +google.cloud.dataplex.v1.ListSessionsRequest + */ +class ListSessionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions 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. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` 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. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * mode = ADMIN | USER + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. Please see + * {@see DataplexServiceClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListSessionsRequest + * + * @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 name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * @type int $page_size + * Optional. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` must match the call that provided the page + * token. + * @type string $filter + * Optional. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * mode = ADMIN | USER + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * + * 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 name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * + * 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. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions 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. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions 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. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` 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. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` 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. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * mode = ADMIN | USER + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * mode = ADMIN | USER + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php new file mode 100644 index 000000000000..2563a5529f20 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListSessionsResponse + */ +class ListSessionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sessions under a given environment. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; + */ + private $sessions; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Session>|\Google\Protobuf\Internal\RepeatedField $sessions + * Sessions under a given environment. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Sessions under a given environment. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSessions() + { + return $this->sessions; + } + + /** + * Sessions under a given environment. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; + * @param array<\Google\Cloud\Dataplex\V1\Session>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Session::class); + $this->sessions = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php new file mode 100644 index 000000000000..cf55741d71e1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php @@ -0,0 +1,238 @@ +google.cloud.dataplex.v1.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks 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. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListTasksRequest + * + * @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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @type int $page_size + * Optional. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks 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. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks 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. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` 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. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php new file mode 100644 index 000000000000..1adb1c8897d6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php @@ -0,0 +1,139 @@ +google.cloud.dataplex.v1.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Tasks under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; + */ + private $tasks; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + */ + private $unreachable_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * Tasks under the given parent lake. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Tasks under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * Tasks under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; + * @param array<\Google\Cloud\Dataplex\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachableLocations() + { + return $this->unreachable_locations; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable_locations = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachableLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable_locations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php new file mode 100644 index 000000000000..5a9b823e9b99 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php @@ -0,0 +1,174 @@ +google.cloud.dataplex.v1.ListZoneActionsRequest + */ +class ListZoneActionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` 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 = ''; + + /** + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see + * {@see DataplexServiceClient::zoneName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListZoneActionsRequest + * + * @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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @type int $page_size + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` must match the call that provided + * the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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 name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * 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. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` 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. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` 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; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php new file mode 100644 index 000000000000..7357a9f6e6c2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php @@ -0,0 +1,238 @@ +google.cloud.dataplex.v1.ListZonesRequest + */ +class ListZonesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones 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. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see + * {@see DataplexServiceClient::lakeName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\ListZonesRequest + * + * @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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @type int $page_size + * Optional. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @type string $filter + * Optional. Filter request. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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 name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * + * 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. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones 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. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones 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. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` 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. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` 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. Filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter request. + * + * 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; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php new file mode 100644 index 000000000000..93963cfdc21b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataplex.v1.ListZonesResponse + */ +class ListZonesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Zones under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; + */ + private $zones; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Dataplex\V1\Zone>|\Google\Protobuf\Internal\RepeatedField $zones + * Zones under the given parent lake. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Zones under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getZones() + { + return $this->zones; + } + + /** + * Zones under the given parent lake. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; + * @param array<\Google\Cloud\Dataplex\V1\Zone>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Zone::class); + $this->zones = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php new file mode 100644 index 000000000000..a324fa95f4c8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.dataplex.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php new file mode 100644 index 000000000000..57cd119f1bb7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php @@ -0,0 +1,202 @@ +google.cloud.dataplex.v1.Partition + */ +class Partition extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Partition values used in the HTTP URL must be + * double encoded. For example, `url_encode(url_encode(value))` can be used + * to encode "US:CA/CA#Sunnyvale so that the request URL ends + * with "/partitions/US%253ACA/CA%2523Sunnyvale". + * The name field in the response retains the encoded format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Immutable. The set of values representing the partition, which + * correspond to the partition schema defined in the parent entity. + * + * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $values; + /** + * Required. Immutable. The location of the entity data within the partition, + * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or + * `projects//datasets//tables/` + * + * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $location = ''; + /** + * Optional. The etag for this partition. + * + * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Partition values used in the HTTP URL must be + * double encoded. For example, `url_encode(url_encode(value))` can be used + * to encode "US:CA/CA#Sunnyvale so that the request URL ends + * with "/partitions/US%253ACA/CA%2523Sunnyvale". + * The name field in the response retains the encoded format. + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * Required. Immutable. The set of values representing the partition, which + * correspond to the partition schema defined in the parent entity. + * @type string $location + * Required. Immutable. The location of the entity data within the partition, + * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or + * `projects//datasets//tables/` + * @type string $etag + * Optional. The etag for this partition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Partition values used in the HTTP URL must be + * double encoded. For example, `url_encode(url_encode(value))` can be used + * to encode "US:CA/CA#Sunnyvale so that the request URL ends + * with "/partitions/US%253ACA/CA%2523Sunnyvale". + * The name field in the response retains the encoded format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Partition values used in the HTTP URL must be + * double encoded. For example, `url_encode(url_encode(value))` can be used + * to encode "US:CA/CA#Sunnyvale so that the request URL ends + * with "/partitions/US%253ACA/CA%2523Sunnyvale". + * The name field in the response retains the encoded format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. The set of values representing the partition, which + * correspond to the partition schema defined in the parent entity. + * + * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Required. Immutable. The set of values representing the partition, which + * correspond to the partition schema defined in the parent entity. + * + * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + + /** + * Required. Immutable. The location of the entity data within the partition, + * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or + * `projects//datasets//tables/` + * + * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. Immutable. The location of the entity data within the partition, + * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or + * `projects//datasets//tables/` + * + * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Optional. The etag for this partition. + * + * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getEtag() + { + @trigger_error('etag is deprecated.', E_USER_DEPRECATED); + return $this->etag; + } + + /** + * Optional. The etag for this partition. + * + * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setEtag($var) + { + @trigger_error('etag is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php new file mode 100644 index 000000000000..21c5ac6ae057 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php @@ -0,0 +1,145 @@ +google.cloud.dataplex.v1.ResourceAccessSpec + */ +class ResourceAccessSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on the resource. + * + * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $readers; + /** + * Optional. The set of principals to be granted writer role on the resource. + * + * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $writers; + /** + * Optional. The set of principals to be granted owner role on the resource. + * + * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $owners; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $readers + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on the resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $writers + * Optional. The set of principals to be granted writer role on the resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $owners + * Optional. The set of principals to be granted owner role on the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Security::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on the resource. + * + * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReaders() + { + return $this->readers; + } + + /** + * Optional. The format of strings follows the pattern followed by IAM in the + * bindings. user:{email}, serviceAccount:{email} group:{email}. + * The set of principals to be granted reader role on the resource. + * + * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->readers = $arr; + + return $this; + } + + /** + * Optional. The set of principals to be granted writer role on the resource. + * + * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWriters() + { + return $this->writers; + } + + /** + * Optional. The set of principals to be granted writer role on the resource. + * + * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWriters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->writers = $arr; + + return $this; + } + + /** + * Optional. The set of principals to be granted owner role on the resource. + * + * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOwners() + { + return $this->owners; + } + + /** + * Optional. The set of principals to be granted owner role on the resource. + * + * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOwners($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->owners = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php new file mode 100644 index 000000000000..1b01b86683b5 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php @@ -0,0 +1,102 @@ +google.cloud.dataplex.v1.RunDataScanRequest + */ +class RunDataScanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * Only **OnDemand** data scans are allowed. + * + * 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 DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Only **OnDemand** data scans are allowed. Please see + * {@see DataScanServiceClient::dataScanName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\RunDataScanRequest + * + * @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 DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * Only **OnDemand** data scans are allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * Only **OnDemand** data scans are allowed. + * + * 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 DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * Only **OnDemand** data scans are allowed. + * + * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php new file mode 100644 index 000000000000..5bdc7ae1f097 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php @@ -0,0 +1,77 @@ +google.cloud.dataplex.v1.RunDataScanResponse + */ +class RunDataScanResponse extends \Google\Protobuf\Internal\Message +{ + /** + * DataScanJob created by RunDataScan request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; + */ + protected $job = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataScanJob $job + * DataScanJob created by RunDataScan request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * DataScanJob created by RunDataScan request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; + * @return \Google\Cloud\Dataplex\V1\DataScanJob|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * DataScanJob created by RunDataScan request. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; + * @param \Google\Cloud\Dataplex\V1\DataScanJob $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanJob::class); + $this->job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php new file mode 100644 index 000000000000..ce2348d52af6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php @@ -0,0 +1,200 @@ +google.cloud.dataplex.v1.RunTaskRequest + */ +class RunTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. User-defined labels for the task. If the map is left empty, the + * task will run with existing labels from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * labels. If the map contains an entry with an existing label key in task + * definition, the task will run with new label value for that entry. Clearing + * an existing label will require label value to be explicitly set to a hyphen + * "-". The label value cannot be empty. + * + * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Execution spec arguments. If the map is left empty, the task will + * run with existing execution spec args from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * args. If the map contains an entry with an existing arg key in task + * definition, the task will run with new arg value for that entry. Clearing + * an existing arg will require arg value to be explicitly set to a hyphen + * "-". The arg value cannot be empty. + * + * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $args; + + /** + * @param string $name Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see + * {@see DataplexServiceClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Dataplex\V1\RunTaskRequest + * + * @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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for the task. If the map is left empty, the + * task will run with existing labels from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * labels. If the map contains an entry with an existing label key in task + * definition, the task will run with new label value for that entry. Clearing + * an existing label will require label value to be explicitly set to a hyphen + * "-". The label value cannot be empty. + * @type array|\Google\Protobuf\Internal\MapField $args + * Optional. Execution spec arguments. If the map is left empty, the task will + * run with existing execution spec args from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * args. If the map contains an entry with an existing arg key in task + * definition, the task will run with new arg value for that entry. Clearing + * an existing arg will require arg value to be explicitly set to a hyphen + * "-". The arg value cannot be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * + * 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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * + * 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. User-defined labels for the task. If the map is left empty, the + * task will run with existing labels from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * labels. If the map contains an entry with an existing label key in task + * definition, the task will run with new label value for that entry. Clearing + * an existing label will require label value to be explicitly set to a hyphen + * "-". The label value cannot be empty. + * + * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for the task. If the map is left empty, the + * task will run with existing labels from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * labels. If the map contains an entry with an existing label key in task + * definition, the task will run with new label value for that entry. Clearing + * an existing label will require label value to be explicitly set to a hyphen + * "-". The label value cannot be empty. + * + * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Execution spec arguments. If the map is left empty, the task will + * run with existing execution spec args from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * args. If the map contains an entry with an existing arg key in task + * definition, the task will run with new arg value for that entry. Clearing + * an existing arg will require arg value to be explicitly set to a hyphen + * "-". The arg value cannot be empty. + * + * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional. Execution spec arguments. If the map is left empty, the task will + * run with existing execution spec args from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * args. If the map contains an entry with an existing arg key in task + * definition, the task will run with new arg value for that entry. Clearing + * an existing arg will require arg value to be explicitly set to a hyphen + * "-". The arg value cannot be empty. + * + * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->args = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php new file mode 100644 index 000000000000..c13e5017fcc3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php @@ -0,0 +1,75 @@ +google.cloud.dataplex.v1.RunTaskResponse + */ +class RunTaskResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Jobs created by RunTask API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; + */ + protected $job = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\Job $job + * Jobs created by RunTask API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Jobs created by RunTask API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; + * @return \Google\Cloud\Dataplex\V1\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Jobs created by RunTask API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; + * @param \Google\Cloud\Dataplex\V1\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Job::class); + $this->job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php new file mode 100644 index 000000000000..176ced6a4304 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php @@ -0,0 +1,75 @@ +google.cloud.dataplex.v1.ScannedData + */ +class ScannedData extends \Google\Protobuf\Internal\Message +{ + protected $data_range; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField $incremental_field + * The range denoted by values of an incremental field + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); + parent::__construct($data); + } + + /** + * The range denoted by values of an incremental field + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData.IncrementalField incremental_field = 1; + * @return \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField|null + */ + public function getIncrementalField() + { + return $this->readOneof(1); + } + + public function hasIncrementalField() + { + return $this->hasOneof(1); + } + + /** + * The range denoted by values of an incremental field + * + * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData.IncrementalField incremental_field = 1; + * @param \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField $var + * @return $this + */ + public function setIncrementalField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDataRange() + { + return $this->whichOneof("data_range"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php new file mode 100644 index 000000000000..c7ea783f0481 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php @@ -0,0 +1,142 @@ +google.cloud.dataplex.v1.ScannedData.IncrementalField + */ +class IncrementalField extends \Google\Protobuf\Internal\Message +{ + /** + * The field that contains values which monotonically increases over time + * (e.g. a timestamp column). + * + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + /** + * Value that marks the start of the range. + * + * Generated from protobuf field string start = 2; + */ + protected $start = ''; + /** + * Value that marks the end of the range. + * + * Generated from protobuf field string end = 3; + */ + protected $end = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * The field that contains values which monotonically increases over time + * (e.g. a timestamp column). + * @type string $start + * Value that marks the start of the range. + * @type string $end + * Value that marks the end of the range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); + parent::__construct($data); + } + + /** + * The field that contains values which monotonically increases over time + * (e.g. a timestamp column). + * + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * The field that contains values which monotonically increases over time + * (e.g. a timestamp column). + * + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Value that marks the start of the range. + * + * Generated from protobuf field string start = 2; + * @return string + */ + public function getStart() + { + return $this->start; + } + + /** + * Value that marks the start of the range. + * + * Generated from protobuf field string start = 2; + * @param string $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkString($var, True); + $this->start = $var; + + return $this; + } + + /** + * Value that marks the end of the range. + * + * Generated from protobuf field string end = 3; + * @return string + */ + public function getEnd() + { + return $this->end; + } + + /** + * Value that marks the end of the range. + * + * Generated from protobuf field string end = 3; + * @param string $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkString($var, True); + $this->end = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IncrementalField::class, \Google\Cloud\Dataplex\V1\ScannedData_IncrementalField::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php new file mode 100644 index 000000000000..40081aed1552 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php @@ -0,0 +1,221 @@ +google.cloud.dataplex.v1.Schema + */ +class Schema extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Set to `true` if user-managed or `false` if managed by Dataplex. + * The default is `false` (managed by Dataplex). + * - Set to `false`to enable Dataplex discovery to update the schema. + * including new data discovery, schema inference, and schema evolution. + * Users retain the ability to input and edit the schema. Dataplex + * treats schema input by the user as though produced + * by a previous Dataplex discovery operation, and it will + * evolve the schema and take action based on that treatment. + * - Set to `true` to fully manage the entity + * schema. This setting guarantees that Dataplex will not + * change schema fields. + * + * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_managed = false; + /** + * Optional. The sequence of fields describing data in table entities. + * **Note:** BigQuery SchemaFields are immutable. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $fields; + /** + * Optional. The sequence of fields describing the partition structure in + * entities. If this field is empty, there are no partitions within the data. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $partition_fields; + /** + * Optional. The structure of paths containing partition data within the + * entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $partition_style = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $user_managed + * Required. Set to `true` if user-managed or `false` if managed by Dataplex. + * The default is `false` (managed by Dataplex). + * - Set to `false`to enable Dataplex discovery to update the schema. + * including new data discovery, schema inference, and schema evolution. + * Users retain the ability to input and edit the schema. Dataplex + * treats schema input by the user as though produced + * by a previous Dataplex discovery operation, and it will + * evolve the schema and take action based on that treatment. + * - Set to `true` to fully manage the entity + * schema. This setting guarantees that Dataplex will not + * change schema fields. + * @type array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $fields + * Optional. The sequence of fields describing data in table entities. + * **Note:** BigQuery SchemaFields are immutable. + * @type array<\Google\Cloud\Dataplex\V1\Schema\PartitionField>|\Google\Protobuf\Internal\RepeatedField $partition_fields + * Optional. The sequence of fields describing the partition structure in + * entities. If this field is empty, there are no partitions within the data. + * @type int $partition_style + * Optional. The structure of paths containing partition data within the + * entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. Set to `true` if user-managed or `false` if managed by Dataplex. + * The default is `false` (managed by Dataplex). + * - Set to `false`to enable Dataplex discovery to update the schema. + * including new data discovery, schema inference, and schema evolution. + * Users retain the ability to input and edit the schema. Dataplex + * treats schema input by the user as though produced + * by a previous Dataplex discovery operation, and it will + * evolve the schema and take action based on that treatment. + * - Set to `true` to fully manage the entity + * schema. This setting guarantees that Dataplex will not + * change schema fields. + * + * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getUserManaged() + { + return $this->user_managed; + } + + /** + * Required. Set to `true` if user-managed or `false` if managed by Dataplex. + * The default is `false` (managed by Dataplex). + * - Set to `false`to enable Dataplex discovery to update the schema. + * including new data discovery, schema inference, and schema evolution. + * Users retain the ability to input and edit the schema. Dataplex + * treats schema input by the user as though produced + * by a previous Dataplex discovery operation, and it will + * evolve the schema and take action based on that treatment. + * - Set to `true` to fully manage the entity + * schema. This setting guarantees that Dataplex will not + * change schema fields. + * + * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setUserManaged($var) + { + GPBUtil::checkBool($var); + $this->user_managed = $var; + + return $this; + } + + /** + * Optional. The sequence of fields describing data in table entities. + * **Note:** BigQuery SchemaFields are immutable. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Optional. The sequence of fields describing data in table entities. + * **Note:** BigQuery SchemaFields are immutable. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\SchemaField::class); + $this->fields = $arr; + + return $this; + } + + /** + * Optional. The sequence of fields describing the partition structure in + * entities. If this field is empty, there are no partitions within the data. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartitionFields() + { + return $this->partition_fields; + } + + /** + * Optional. The sequence of fields describing the partition structure in + * entities. If this field is empty, there are no partitions within the data. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dataplex\V1\Schema\PartitionField>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartitionFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\PartitionField::class); + $this->partition_fields = $arr; + + return $this; + } + + /** + * Optional. The structure of paths containing partition data within the + * entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPartitionStyle() + { + return $this->partition_style; + } + + /** + * Optional. The structure of paths containing partition data within the + * entity. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPartitionStyle($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\PartitionStyle::class); + $this->partition_style = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php new file mode 100644 index 000000000000..4f737cbbce7b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php @@ -0,0 +1,71 @@ +google.cloud.dataplex.v1.Schema.Mode + */ +class Mode +{ + /** + * Mode unspecified. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * The field has required semantics. + * + * Generated from protobuf enum REQUIRED = 1; + */ + const REQUIRED = 1; + /** + * The field has optional semantics, and may be null. + * + * Generated from protobuf enum NULLABLE = 2; + */ + const NULLABLE = 2; + /** + * The field has repeated (0 or more) semantics, and is a list of values. + * + * Generated from protobuf enum REPEATED = 3; + */ + const REPEATED = 3; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::REQUIRED => 'REQUIRED', + self::NULLABLE => 'NULLABLE', + self::REPEATED => 'REPEATED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\Dataplex\V1\Schema_Mode::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php new file mode 100644 index 000000000000..504de2911360 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php @@ -0,0 +1,115 @@ +google.cloud.dataplex.v1.Schema.PartitionField + */ +class PartitionField extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Partition field name must consist of letters, numbers, and + * underscores only, with a maximum of length of 256 characters, and must + * begin with a letter or underscore.. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. Immutable. The type of field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Partition field name must consist of letters, numbers, and + * underscores only, with a maximum of length of 256 characters, and must + * begin with a letter or underscore.. + * @type int $type + * Required. Immutable. The type of field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. Partition field name must consist of letters, numbers, and + * underscores only, with a maximum of length of 256 characters, and must + * begin with a letter or underscore.. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Partition field name must consist of letters, numbers, and + * underscores only, with a maximum of length of 256 characters, and must + * begin with a letter or underscore.. + * + * 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; + } + + /** + * Required. Immutable. The type of field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Immutable. The type of field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Type::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PartitionField::class, \Google\Cloud\Dataplex\V1\Schema_PartitionField::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php new file mode 100644 index 000000000000..4162a37726fe --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php @@ -0,0 +1,59 @@ +google.cloud.dataplex.v1.Schema.PartitionStyle + */ +class PartitionStyle +{ + /** + * PartitionStyle unspecified + * + * Generated from protobuf enum PARTITION_STYLE_UNSPECIFIED = 0; + */ + const PARTITION_STYLE_UNSPECIFIED = 0; + /** + * Partitions are hive-compatible. + * Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, + * `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. + * + * Generated from protobuf enum HIVE_COMPATIBLE = 1; + */ + const HIVE_COMPATIBLE = 1; + + private static $valueToName = [ + self::PARTITION_STYLE_UNSPECIFIED => 'PARTITION_STYLE_UNSPECIFIED', + self::HIVE_COMPATIBLE => 'HIVE_COMPATIBLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PartitionStyle::class, \Google\Cloud\Dataplex\V1\Schema_PartitionStyle::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php new file mode 100644 index 000000000000..5811645ddf75 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php @@ -0,0 +1,218 @@ +google.cloud.dataplex.v1.Schema.SchemaField + */ +class SchemaField extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the field. Must contain only letters, numbers and + * underscores, with a maximum length of 767 characters, + * and must begin with a letter or underscore. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. User friendly field description. Must be less than or equal to + * 1024 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. The type of field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Additional field semantics. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mode = 0; + /** + * Optional. Any nested field for complex types. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the field. Must contain only letters, numbers and + * underscores, with a maximum length of 767 characters, + * and must begin with a letter or underscore. + * @type string $description + * Optional. User friendly field description. Must be less than or equal to + * 1024 characters. + * @type int $type + * Required. The type of field. + * @type int $mode + * Required. Additional field semantics. + * @type array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $fields + * Optional. Any nested field for complex types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the field. Must contain only letters, numbers and + * underscores, with a maximum length of 767 characters, + * and must begin with a letter or underscore. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the field. Must contain only letters, numbers and + * underscores, with a maximum length of 767 characters, + * and must begin with a letter or underscore. + * + * 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; + } + + /** + * Optional. User friendly field description. Must be less than or equal to + * 1024 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User friendly field description. Must be less than or equal to + * 1024 characters. + * + * 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; + } + + /** + * Required. The type of field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of field. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Additional field semantics. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Required. Additional field semantics. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. Any nested field for complex types. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * Optional. Any nested field for complex types. + * + * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\SchemaField::class); + $this->fields = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SchemaField::class, \Google\Cloud\Dataplex\V1\Schema_SchemaField::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php new file mode 100644 index 000000000000..32335b4443a1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php @@ -0,0 +1,156 @@ +google.cloud.dataplex.v1.Schema.Type + */ +class Type +{ + /** + * SchemaType unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Boolean field. + * + * Generated from protobuf enum BOOLEAN = 1; + */ + const BOOLEAN = 1; + /** + * Single byte numeric field. + * + * Generated from protobuf enum BYTE = 2; + */ + const BYTE = 2; + /** + * 16-bit numeric field. + * + * Generated from protobuf enum INT16 = 3; + */ + const INT16 = 3; + /** + * 32-bit numeric field. + * + * Generated from protobuf enum INT32 = 4; + */ + const INT32 = 4; + /** + * 64-bit numeric field. + * + * Generated from protobuf enum INT64 = 5; + */ + const INT64 = 5; + /** + * Floating point numeric field. + * + * Generated from protobuf enum FLOAT = 6; + */ + const FLOAT = 6; + /** + * Double precision numeric field. + * + * Generated from protobuf enum DOUBLE = 7; + */ + const DOUBLE = 7; + /** + * Real value numeric field. + * + * Generated from protobuf enum DECIMAL = 8; + */ + const DECIMAL = 8; + /** + * Sequence of characters field. + * + * Generated from protobuf enum STRING = 9; + */ + const STRING = 9; + /** + * Sequence of bytes field. + * + * Generated from protobuf enum BINARY = 10; + */ + const BINARY = 10; + /** + * Date and time field. + * + * Generated from protobuf enum TIMESTAMP = 11; + */ + const TIMESTAMP = 11; + /** + * Date field. + * + * Generated from protobuf enum DATE = 12; + */ + const DATE = 12; + /** + * Time field. + * + * Generated from protobuf enum TIME = 13; + */ + const TIME = 13; + /** + * Structured field. Nested fields that define the structure of the map. + * If all nested fields are nullable, this field represents a union. + * + * Generated from protobuf enum RECORD = 14; + */ + const RECORD = 14; + /** + * Null field that does not have values. + * + * Generated from protobuf enum NULL = 100; + */ + const NULL = 100; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::BOOLEAN => 'BOOLEAN', + self::BYTE => 'BYTE', + self::INT16 => 'INT16', + self::INT32 => 'INT32', + self::INT64 => 'INT64', + self::FLOAT => 'FLOAT', + self::DOUBLE => 'DOUBLE', + self::DECIMAL => 'DECIMAL', + self::STRING => 'STRING', + self::BINARY => 'BINARY', + self::TIMESTAMP => 'TIMESTAMP', + self::DATE => 'DATE', + self::TIME => 'TIME', + self::RECORD => 'RECORD', + self::NULL => 'NULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Dataplex\V1\Schema_Type::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php new file mode 100644 index 000000000000..e97bb288861b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php @@ -0,0 +1,183 @@ +google.cloud.dataplex.v1.Session + */ +class Session extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. Email of user running the session. + * + * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $user_id = ''; + /** + * Output only. Session start time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. State of Session + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} + * @type string $user_id + * Output only. Email of user running the session. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Session start time. + * @type int $state + * Output only. State of Session + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the content, of the form: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Email of user running the session. + * + * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * Output only. Email of user running the session. + * + * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkString($var, True); + $this->user_id = $var; + + return $this; + } + + /** + * Output only. Session start 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. Session start 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. State of Session + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of Session + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php new file mode 100644 index 000000000000..7caa11fbef96 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php @@ -0,0 +1,332 @@ +google.cloud.dataplex.v1.SessionEvent + */ +class SessionEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The log message. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * The information about the user that created the session. It will be the + * email address of the user. + * + * Generated from protobuf field string user_id = 2; + */ + protected $user_id = ''; + /** + * Unique identifier for the session. + * + * Generated from protobuf field string session_id = 3; + */ + protected $session_id = ''; + /** + * The type of the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; + */ + protected $type = 0; + /** + * The status of the event. + * + * Generated from protobuf field bool event_succeeded = 6; + */ + protected $event_succeeded = false; + /** + * If the session is associated with an environment with fast startup enabled, + * and was created before being assigned to a user. + * + * Generated from protobuf field bool fast_startup_enabled = 7; + */ + protected $fast_startup_enabled = false; + /** + * The idle duration of a warm pooled session before it is assigned to user. + * + * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; + */ + protected $unassigned_duration = null; + protected $detail; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * The log message. + * @type string $user_id + * The information about the user that created the session. It will be the + * email address of the user. + * @type string $session_id + * Unique identifier for the session. + * @type int $type + * The type of the event. + * @type \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail $query + * The execution details of the query. + * @type bool $event_succeeded + * The status of the event. + * @type bool $fast_startup_enabled + * If the session is associated with an environment with fast startup enabled, + * and was created before being assigned to a user. + * @type \Google\Protobuf\Duration $unassigned_duration + * The idle duration of a warm pooled session before it is assigned to user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The log message. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The information about the user that created the session. It will be the + * email address of the user. + * + * Generated from protobuf field string user_id = 2; + * @return string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * The information about the user that created the session. It will be the + * email address of the user. + * + * Generated from protobuf field string user_id = 2; + * @param string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkString($var, True); + $this->user_id = $var; + + return $this; + } + + /** + * Unique identifier for the session. + * + * Generated from protobuf field string session_id = 3; + * @return string + */ + public function getSessionId() + { + return $this->session_id; + } + + /** + * Unique identifier for the session. + * + * Generated from protobuf field string session_id = 3; + * @param string $var + * @return $this + */ + public function setSessionId($var) + { + GPBUtil::checkString($var, True); + $this->session_id = $var; + + return $this; + } + + /** + * The type of the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the event. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\SessionEvent\EventType::class); + $this->type = $var; + + return $this; + } + + /** + * The execution details of the query. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail query = 5; + * @return \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail|null + */ + public function getQuery() + { + return $this->readOneof(5); + } + + public function hasQuery() + { + return $this->hasOneof(5); + } + + /** + * The execution details of the query. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail query = 5; + * @param \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The status of the event. + * + * Generated from protobuf field bool event_succeeded = 6; + * @return bool + */ + public function getEventSucceeded() + { + return $this->event_succeeded; + } + + /** + * The status of the event. + * + * Generated from protobuf field bool event_succeeded = 6; + * @param bool $var + * @return $this + */ + public function setEventSucceeded($var) + { + GPBUtil::checkBool($var); + $this->event_succeeded = $var; + + return $this; + } + + /** + * If the session is associated with an environment with fast startup enabled, + * and was created before being assigned to a user. + * + * Generated from protobuf field bool fast_startup_enabled = 7; + * @return bool + */ + public function getFastStartupEnabled() + { + return $this->fast_startup_enabled; + } + + /** + * If the session is associated with an environment with fast startup enabled, + * and was created before being assigned to a user. + * + * Generated from protobuf field bool fast_startup_enabled = 7; + * @param bool $var + * @return $this + */ + public function setFastStartupEnabled($var) + { + GPBUtil::checkBool($var); + $this->fast_startup_enabled = $var; + + return $this; + } + + /** + * The idle duration of a warm pooled session before it is assigned to user. + * + * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getUnassignedDuration() + { + return $this->unassigned_duration; + } + + public function hasUnassignedDuration() + { + return isset($this->unassigned_duration); + } + + public function clearUnassignedDuration() + { + unset($this->unassigned_duration); + } + + /** + * The idle duration of a warm pooled session before it is assigned to user. + * + * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUnassignedDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->unassigned_duration = $var; + + return $this; + } + + /** + * @return string + */ + public function getDetail() + { + return $this->whichOneof("detail"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php new file mode 100644 index 000000000000..18b401bf2f28 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php @@ -0,0 +1,79 @@ +google.cloud.dataplex.v1.SessionEvent.EventType + */ +class EventType +{ + /** + * An unspecified event type. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * Event when the session is assigned to a user. + * + * Generated from protobuf enum START = 1; + */ + const START = 1; + /** + * Event for stop of a session. + * + * Generated from protobuf enum STOP = 2; + */ + const STOP = 2; + /** + * Query events in the session. + * + * Generated from protobuf enum QUERY = 3; + */ + const QUERY = 3; + /** + * Event for creation of a cluster. It is not yet assigned to a user. + * This comes before START in the sequence + * + * Generated from protobuf enum CREATE = 4; + */ + const CREATE = 4; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::START => 'START', + self::STOP => 'STOP', + self::QUERY => 'QUERY', + self::CREATE => 'CREATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\Dataplex\V1\SessionEvent_EventType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php new file mode 100644 index 000000000000..8b5a97c33ce8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php @@ -0,0 +1,250 @@ +google.cloud.dataplex.v1.SessionEvent.QueryDetail + */ +class QueryDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The unique Query id identifying the query. + * + * Generated from protobuf field string query_id = 1; + */ + protected $query_id = ''; + /** + * The query text executed. + * + * Generated from protobuf field string query_text = 2; + */ + protected $query_text = ''; + /** + * Query Execution engine. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; + */ + protected $engine = 0; + /** + * Time taken for execution of the query. + * + * Generated from protobuf field .google.protobuf.Duration duration = 4; + */ + protected $duration = null; + /** + * The size of results the query produced. + * + * Generated from protobuf field int64 result_size_bytes = 5; + */ + protected $result_size_bytes = 0; + /** + * The data processed by the query. + * + * Generated from protobuf field int64 data_processed_bytes = 6; + */ + protected $data_processed_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query_id + * The unique Query id identifying the query. + * @type string $query_text + * The query text executed. + * @type int $engine + * Query Execution engine. + * @type \Google\Protobuf\Duration $duration + * Time taken for execution of the query. + * @type int|string $result_size_bytes + * The size of results the query produced. + * @type int|string $data_processed_bytes + * The data processed by the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); + parent::__construct($data); + } + + /** + * The unique Query id identifying the query. + * + * Generated from protobuf field string query_id = 1; + * @return string + */ + public function getQueryId() + { + return $this->query_id; + } + + /** + * The unique Query id identifying the query. + * + * Generated from protobuf field string query_id = 1; + * @param string $var + * @return $this + */ + public function setQueryId($var) + { + GPBUtil::checkString($var, True); + $this->query_id = $var; + + return $this; + } + + /** + * The query text executed. + * + * Generated from protobuf field string query_text = 2; + * @return string + */ + public function getQueryText() + { + return $this->query_text; + } + + /** + * The query text executed. + * + * Generated from protobuf field string query_text = 2; + * @param string $var + * @return $this + */ + public function setQueryText($var) + { + GPBUtil::checkString($var, True); + $this->query_text = $var; + + return $this; + } + + /** + * Query Execution engine. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; + * @return int + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Query Execution engine. + * + * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; + * @param int $var + * @return $this + */ + public function setEngine($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail\Engine::class); + $this->engine = $var; + + return $this; + } + + /** + * Time taken for execution of the query. + * + * Generated from protobuf field .google.protobuf.Duration duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Time taken for execution of the query. + * + * Generated from protobuf field .google.protobuf.Duration duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * The size of results the query produced. + * + * Generated from protobuf field int64 result_size_bytes = 5; + * @return int|string + */ + public function getResultSizeBytes() + { + return $this->result_size_bytes; + } + + /** + * The size of results the query produced. + * + * Generated from protobuf field int64 result_size_bytes = 5; + * @param int|string $var + * @return $this + */ + public function setResultSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->result_size_bytes = $var; + + return $this; + } + + /** + * The data processed by the query. + * + * Generated from protobuf field int64 data_processed_bytes = 6; + * @return int|string + */ + public function getDataProcessedBytes() + { + return $this->data_processed_bytes; + } + + /** + * The data processed by the query. + * + * Generated from protobuf field int64 data_processed_bytes = 6; + * @param int|string $var + * @return $this + */ + public function setDataProcessedBytes($var) + { + GPBUtil::checkInt64($var); + $this->data_processed_bytes = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QueryDetail::class, \Google\Cloud\Dataplex\V1\SessionEvent_QueryDetail::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php new file mode 100644 index 000000000000..6f64026a6ac4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine + */ +class Engine +{ + /** + * An unspecified Engine type. + * + * Generated from protobuf enum ENGINE_UNSPECIFIED = 0; + */ + const ENGINE_UNSPECIFIED = 0; + /** + * Spark-sql engine is specified in Query. + * + * Generated from protobuf enum SPARK_SQL = 1; + */ + const SPARK_SQL = 1; + /** + * BigQuery engine is specified in Query. + * + * Generated from protobuf enum BIGQUERY = 2; + */ + const BIGQUERY = 2; + + private static $valueToName = [ + self::ENGINE_UNSPECIFIED => 'ENGINE_UNSPECIFIED', + self::SPARK_SQL => 'SPARK_SQL', + self::BIGQUERY => 'BIGQUERY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Engine::class, \Google\Cloud\Dataplex\V1\SessionEvent_QueryDetail_Engine::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php new file mode 100644 index 000000000000..1bd046ff27a4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php @@ -0,0 +1,75 @@ +google.cloud.dataplex.v1.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Resource is active, i.e., ready to use. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Resource is under creation. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Resource is under deletion. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Resource is active but has unresolved actions. + * + * Generated from protobuf enum ACTION_REQUIRED = 4; + */ + const ACTION_REQUIRED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::ACTION_REQUIRED => 'ACTION_REQUIRED', + ]; + + 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php new file mode 100644 index 000000000000..45665e6e1936 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php @@ -0,0 +1,71 @@ +google.cloud.dataplex.v1.StorageAccess + */ +class StorageAccess extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Describes the read access mechanism of the data. Not user + * settable. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $read = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $read + * Output only. Describes the read access mechanism of the data. Not user + * settable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Describes the read access mechanism of the data. Not user + * settable. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRead() + { + return $this->read; + } + + /** + * Output only. Describes the read access mechanism of the data. Not user + * settable. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRead($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageAccess\AccessMode::class); + $this->read = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php new file mode 100644 index 000000000000..94316b5dfff7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.StorageAccess.AccessMode + */ +class AccessMode +{ + /** + * Access mode unspecified. + * + * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; + */ + const ACCESS_MODE_UNSPECIFIED = 0; + /** + * Default. Data is accessed directly using storage APIs. + * + * Generated from protobuf enum DIRECT = 1; + */ + const DIRECT = 1; + /** + * Data is accessed through a managed interface using BigQuery APIs. + * + * Generated from protobuf enum MANAGED = 2; + */ + const MANAGED = 2; + + private static $valueToName = [ + self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_MODE_UNSPECIFIED', + self::DIRECT => 'DIRECT', + self::MANAGED => 'MANAGED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccessMode::class, \Google\Cloud\Dataplex\V1\StorageAccess_AccessMode::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php new file mode 100644 index 000000000000..8b8964f3d7a6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php @@ -0,0 +1,311 @@ +google.cloud.dataplex.v1.StorageFormat + */ +class StorageFormat extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The data format associated with the stored data, which + * represents content type values. The value is inferred from mime type. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $format = 0; + /** + * Optional. The compression type associated with the stored data. + * If unspecified, the data is uncompressed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $compression_format = 0; + /** + * Required. The mime type descriptor for the data. Must match the pattern + * {type}/{subtype}. Supported values: + * - application/x-parquet + * - application/x-avro + * - application/x-orc + * - application/x-tfrecord + * - application/x-parquet+iceberg + * - application/x-avro+iceberg + * - application/x-orc+iceberg + * - application/json + * - application/{subtypes} + * - text/csv + * - text/ + * - image/{image subtype} + * - video/{video subtype} + * - audio/{audio subtype} + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mime_type = ''; + protected $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $format + * Output only. The data format associated with the stored data, which + * represents content type values. The value is inferred from mime type. + * @type int $compression_format + * Optional. The compression type associated with the stored data. + * If unspecified, the data is uncompressed. + * @type string $mime_type + * Required. The mime type descriptor for the data. Must match the pattern + * {type}/{subtype}. Supported values: + * - application/x-parquet + * - application/x-avro + * - application/x-orc + * - application/x-tfrecord + * - application/x-parquet+iceberg + * - application/x-avro+iceberg + * - application/x-orc+iceberg + * - application/json + * - application/{subtypes} + * - text/csv + * - text/ + * - image/{image subtype} + * - video/{video subtype} + * - audio/{audio subtype} + * @type \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $csv + * Optional. Additional information about CSV formatted data. + * @type \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $json + * Optional. Additional information about CSV formatted data. + * @type \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $iceberg + * Optional. Additional information about iceberg tables. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The data format associated with the stored data, which + * represents content type values. The value is inferred from mime type. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * Output only. The data format associated with the stored data, which + * represents content type values. The value is inferred from mime type. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\Format::class); + $this->format = $var; + + return $this; + } + + /** + * Optional. The compression type associated with the stored data. + * If unspecified, the data is uncompressed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCompressionFormat() + { + return $this->compression_format; + } + + /** + * Optional. The compression type associated with the stored data. + * If unspecified, the data is uncompressed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCompressionFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\CompressionFormat::class); + $this->compression_format = $var; + + return $this; + } + + /** + * Required. The mime type descriptor for the data. Must match the pattern + * {type}/{subtype}. Supported values: + * - application/x-parquet + * - application/x-avro + * - application/x-orc + * - application/x-tfrecord + * - application/x-parquet+iceberg + * - application/x-avro+iceberg + * - application/x-orc+iceberg + * - application/json + * - application/{subtypes} + * - text/csv + * - text/ + * - image/{image subtype} + * - video/{video subtype} + * - audio/{audio subtype} + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Required. The mime type descriptor for the data. Must match the pattern + * {type}/{subtype}. Supported values: + * - application/x-parquet + * - application/x-avro + * - application/x-orc + * - application/x-tfrecord + * - application/x-parquet+iceberg + * - application/x-avro+iceberg + * - application/x-orc+iceberg + * - application/json + * - application/{subtypes} + * - text/csv + * - text/ + * - image/{image subtype} + * - video/{video subtype} + * - audio/{audio subtype} + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Optional. Additional information about CSV formatted data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions|null + */ + public function getCsv() + { + return $this->readOneof(10); + } + + public function hasCsv() + { + return $this->hasOneof(10); + } + + /** + * Optional. Additional information about CSV formatted data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $var + * @return $this + */ + public function setCsv($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Optional. Additional information about CSV formatted data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions|null + */ + public function getJson() + { + return $this->readOneof(11); + } + + public function hasJson() + { + return $this->hasOneof(11); + } + + /** + * Optional. Additional information about CSV formatted data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $var + * @return $this + */ + public function setJson($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Optional. Additional information about iceberg tables. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions|null + */ + public function getIceberg() + { + return $this->readOneof(12); + } + + public function hasIceberg() + { + return $this->hasOneof(12); + } + + /** + * Optional. Additional information about iceberg tables. + * + * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $var + * @return $this + */ + public function setIceberg($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * @return string + */ + public function getOptions() + { + return $this->whichOneof("options"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php new file mode 100644 index 000000000000..fa802d137dae --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.StorageFormat.CompressionFormat + */ +class CompressionFormat +{ + /** + * CompressionFormat unspecified. Implies uncompressed data. + * + * Generated from protobuf enum COMPRESSION_FORMAT_UNSPECIFIED = 0; + */ + const COMPRESSION_FORMAT_UNSPECIFIED = 0; + /** + * GZip compressed set of files. + * + * Generated from protobuf enum GZIP = 2; + */ + const GZIP = 2; + /** + * BZip2 compressed set of files. + * + * Generated from protobuf enum BZIP2 = 3; + */ + const BZIP2 = 3; + + private static $valueToName = [ + self::COMPRESSION_FORMAT_UNSPECIFIED => 'COMPRESSION_FORMAT_UNSPECIFIED', + self::GZIP => 'GZIP', + self::BZIP2 => 'BZIP2', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompressionFormat::class, \Google\Cloud\Dataplex\V1\StorageFormat_CompressionFormat::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php new file mode 100644 index 000000000000..003e9f882b4f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php @@ -0,0 +1,188 @@ +google.cloud.dataplex.v1.StorageFormat.CsvOptions + */ +class CsvOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The character encoding of the data. Accepts "US-ASCII", + * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encoding = ''; + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. Defaults to 0. + * + * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header_rows = 0; + /** + * Optional. The delimiter used to separate values. Defaults to ','. + * + * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delimiter = ''; + /** + * Optional. The character used to quote column values. Accepts '"' + * (double quotation mark) or ''' (single quotation mark). Defaults to + * '"' (double quotation mark) if unspecified. + * + * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $quote = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $encoding + * Optional. The character encoding of the data. Accepts "US-ASCII", + * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + * @type int $header_rows + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. Defaults to 0. + * @type string $delimiter + * Optional. The delimiter used to separate values. Defaults to ','. + * @type string $quote + * Optional. The character used to quote column values. Accepts '"' + * (double quotation mark) or ''' (single quotation mark). Defaults to + * '"' (double quotation mark) if unspecified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The character encoding of the data. Accepts "US-ASCII", + * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Optional. The character encoding of the data. Accepts "US-ASCII", + * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. Defaults to 0. + * + * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getHeaderRows() + { + return $this->header_rows; + } + + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. Defaults to 0. + * + * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setHeaderRows($var) + { + GPBUtil::checkInt32($var); + $this->header_rows = $var; + + return $this; + } + + /** + * Optional. The delimiter used to separate values. Defaults to ','. + * + * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Optional. The delimiter used to separate values. Defaults to ','. + * + * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDelimiter($var) + { + GPBUtil::checkString($var, True); + $this->delimiter = $var; + + return $this; + } + + /** + * Optional. The character used to quote column values. Accepts '"' + * (double quotation mark) or ''' (single quotation mark). Defaults to + * '"' (double quotation mark) if unspecified. + * + * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getQuote() + { + return $this->quote; + } + + /** + * Optional. The character used to quote column values. Accepts '"' + * (double quotation mark) or ''' (single quotation mark). Defaults to + * '"' (double quotation mark) if unspecified. + * + * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setQuote($var) + { + GPBUtil::checkString($var, True); + $this->quote = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_CsvOptions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php new file mode 100644 index 000000000000..3ac0249405c8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php @@ -0,0 +1,134 @@ +google.cloud.dataplex.v1.StorageFormat.Format + */ +class Format +{ + /** + * Format unspecified. + * + * Generated from protobuf enum FORMAT_UNSPECIFIED = 0; + */ + const FORMAT_UNSPECIFIED = 0; + /** + * Parquet-formatted structured data. + * + * Generated from protobuf enum PARQUET = 1; + */ + const PARQUET = 1; + /** + * Avro-formatted structured data. + * + * Generated from protobuf enum AVRO = 2; + */ + const AVRO = 2; + /** + * Orc-formatted structured data. + * + * Generated from protobuf enum ORC = 3; + */ + const ORC = 3; + /** + * Csv-formatted semi-structured data. + * + * Generated from protobuf enum CSV = 100; + */ + const CSV = 100; + /** + * Json-formatted semi-structured data. + * + * Generated from protobuf enum JSON = 101; + */ + const JSON = 101; + /** + * Image data formats (such as jpg and png). + * + * Generated from protobuf enum IMAGE = 200; + */ + const IMAGE = 200; + /** + * Audio data formats (such as mp3, and wav). + * + * Generated from protobuf enum AUDIO = 201; + */ + const AUDIO = 201; + /** + * Video data formats (such as mp4 and mpg). + * + * Generated from protobuf enum VIDEO = 202; + */ + const VIDEO = 202; + /** + * Textual data formats (such as txt and xml). + * + * Generated from protobuf enum TEXT = 203; + */ + const TEXT = 203; + /** + * TensorFlow record format. + * + * Generated from protobuf enum TFRECORD = 204; + */ + const TFRECORD = 204; + /** + * Data that doesn't match a specific format. + * + * Generated from protobuf enum OTHER = 1000; + */ + const OTHER = 1000; + /** + * Data of an unknown format. + * + * Generated from protobuf enum UNKNOWN = 1001; + */ + const UNKNOWN = 1001; + + private static $valueToName = [ + self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED', + self::PARQUET => 'PARQUET', + self::AVRO => 'AVRO', + self::ORC => 'ORC', + self::CSV => 'CSV', + self::JSON => 'JSON', + self::IMAGE => 'IMAGE', + self::AUDIO => 'AUDIO', + self::VIDEO => 'VIDEO', + self::TEXT => 'TEXT', + self::TFRECORD => 'TFRECORD', + self::OTHER => 'OTHER', + self::UNKNOWN => 'UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Format::class, \Google\Cloud\Dataplex\V1\StorageFormat_Format::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php new file mode 100644 index 000000000000..7470657b6049 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php @@ -0,0 +1,74 @@ +google.cloud.dataplex.v1.StorageFormat.IcebergOptions + */ +class IcebergOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The location of where the iceberg metadata is present, must be + * within the table path + * + * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metadata_location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metadata_location + * Optional. The location of where the iceberg metadata is present, must be + * within the table path + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The location of where the iceberg metadata is present, must be + * within the table path + * + * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMetadataLocation() + { + return $this->metadata_location; + } + + /** + * Optional. The location of where the iceberg metadata is present, must be + * within the table path + * + * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMetadataLocation($var) + { + GPBUtil::checkString($var, True); + $this->metadata_location = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IcebergOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_IcebergOptions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php new file mode 100644 index 000000000000..177947e65192 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php @@ -0,0 +1,74 @@ +google.cloud.dataplex.v1.StorageFormat.JsonOptions + */ +class JsonOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + * and "ISO-8859-1". Defaults to UTF-8 if not specified. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encoding = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $encoding + * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + * and "ISO-8859-1". Defaults to UTF-8 if not specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + * and "ISO-8859-1". Defaults to UTF-8 if not specified. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + * and "ISO-8859-1". Defaults to UTF-8 if not specified. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_JsonOptions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php new file mode 100644 index 000000000000..e5483839dc93 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php @@ -0,0 +1,61 @@ +google.cloud.dataplex.v1.StorageSystem + */ +class StorageSystem +{ + /** + * Storage system unspecified. + * + * Generated from protobuf enum STORAGE_SYSTEM_UNSPECIFIED = 0; + */ + const STORAGE_SYSTEM_UNSPECIFIED = 0; + /** + * The entity data is contained within a Cloud Storage bucket. + * + * Generated from protobuf enum CLOUD_STORAGE = 1; + */ + const CLOUD_STORAGE = 1; + /** + * The entity data is contained within a BigQuery dataset. + * + * Generated from protobuf enum BIGQUERY = 2; + */ + const BIGQUERY = 2; + + private static $valueToName = [ + self::STORAGE_SYSTEM_UNSPECIFIED => 'STORAGE_SYSTEM_UNSPECIFIED', + self::CLOUD_STORAGE => 'CLOUD_STORAGE', + self::BIGQUERY => 'BIGQUERY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php new file mode 100644 index 000000000000..59b952e8fcd2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php @@ -0,0 +1,544 @@ +google.cloud.dataplex.v1.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the task, of the form: + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + * tasks/{task_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. System generated globally unique ID for the task. This ID will + * be different if the task is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the task was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the task was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Description of the task. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. Current state of the task. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. User-defined labels for the task. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Spec related to how often and when a task should be triggered. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trigger_spec = null; + /** + * Required. Spec related to how a task is executed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $execution_spec = null; + /** + * Output only. Status of the latest task executions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $execution_status = null; + protected $config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the task, of the form: + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + * tasks/{task_id}. + * @type string $uid + * Output only. System generated globally unique ID for the task. This ID will + * be different if the task is deleted and re-created with the same name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the task was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the task was last updated. + * @type string $description + * Optional. Description of the task. + * @type string $display_name + * Optional. User friendly display name. + * @type int $state + * Output only. Current state of the task. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for the task. + * @type \Google\Cloud\Dataplex\V1\Task\TriggerSpec $trigger_spec + * Required. Spec related to how often and when a task should be triggered. + * @type \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $execution_spec + * Required. Spec related to how a task is executed. + * @type \Google\Cloud\Dataplex\V1\Task\ExecutionStatus $execution_status + * Output only. Status of the latest task executions. + * @type \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig $spark + * Config related to running custom Spark tasks. + * @type \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig $notebook + * Config related to running scheduled Notebooks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the task, of the form: + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + * tasks/{task_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the task, of the form: + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + * tasks/{task_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the task. This ID will + * be different if the task is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the task. This ID will + * be different if the task is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the task was created. + * + * 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. The time when the task was created. + * + * 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. The time when the task was last updated. + * + * 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. The time when the task was last updated. + * + * 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. Description of the task. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the task. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Current state of the task. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the task. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. User-defined labels for the task. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for the task. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Spec related to how often and when a task should be triggered. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Task\TriggerSpec|null + */ + public function getTriggerSpec() + { + return $this->trigger_spec; + } + + public function hasTriggerSpec() + { + return isset($this->trigger_spec); + } + + public function clearTriggerSpec() + { + unset($this->trigger_spec); + } + + /** + * Required. Spec related to how often and when a task should be triggered. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Task\TriggerSpec $var + * @return $this + */ + public function setTriggerSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\TriggerSpec::class); + $this->trigger_spec = $var; + + return $this; + } + + /** + * Required. Spec related to how a task is executed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Task\ExecutionSpec|null + */ + public function getExecutionSpec() + { + return $this->execution_spec; + } + + public function hasExecutionSpec() + { + return isset($this->execution_spec); + } + + public function clearExecutionSpec() + { + unset($this->execution_spec); + } + + /** + * Required. Spec related to how a task is executed. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $var + * @return $this + */ + public function setExecutionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionSpec::class); + $this->execution_spec = $var; + + return $this; + } + + /** + * Output only. Status of the latest task executions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Task\ExecutionStatus|null + */ + public function getExecutionStatus() + { + return $this->execution_status; + } + + public function hasExecutionStatus() + { + return isset($this->execution_status); + } + + public function clearExecutionStatus() + { + unset($this->execution_status); + } + + /** + * Output only. Status of the latest task executions. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Task\ExecutionStatus $var + * @return $this + */ + public function setExecutionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionStatus::class); + $this->execution_status = $var; + + return $this; + } + + /** + * Config related to running custom Spark tasks. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.SparkTaskConfig spark = 300; + * @return \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig|null + */ + public function getSpark() + { + return $this->readOneof(300); + } + + public function hasSpark() + { + return $this->hasOneof(300); + } + + /** + * Config related to running custom Spark tasks. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.SparkTaskConfig spark = 300; + * @param \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig $var + * @return $this + */ + public function setSpark($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig::class); + $this->writeOneof(300, $var); + + return $this; + } + + /** + * Config related to running scheduled Notebooks. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * @return \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig|null + */ + public function getNotebook() + { + return $this->readOneof(302); + } + + public function hasNotebook() + { + return $this->hasOneof(302); + } + + /** + * Config related to running scheduled Notebooks. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * @param \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig $var + * @return $this + */ + public function setNotebook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig::class); + $this->writeOneof(302, $var); + + return $this; + } + + /** + * @return string + */ + public function getConfig() + { + return $this->whichOneof("config"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php new file mode 100644 index 000000000000..83af80d663e7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php @@ -0,0 +1,284 @@ +google.cloud.dataplex.v1.Task.ExecutionSpec + */ +class ExecutionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The arguments to pass to the task. + * The args can use placeholders of the format ${placeholder} as + * part of key/value string. These will be interpolated before passing the + * args to the driver. Currently supported placeholders: + * - ${task_id} + * - ${job_time} + * To pass positional args, set the key as TASK_ARGS. The value should be a + * comma-separated string of all the positional arguments. To use a + * delimiter other than comma, refer to + * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + * other keys being present in the args, then TASK_ARGS will be passed as + * the last argument. + * + * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $args; + /** + * Required. Service account to use to execute a task. + * If not provided, the default Compute service account for the project is + * used. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_account = ''; + /** + * Optional. The project in which jobs are run. By default, the project + * containing the Lake is used. If a project is provided, the + * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] + * must belong to this project. + * + * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $project = ''; + /** + * Optional. The maximum duration after which the job execution is expired. + * + * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_job_execution_lifetime = null; + /** + * Optional. The Cloud KMS key to use for encryption, of the form: + * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. + * + * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $args + * Optional. The arguments to pass to the task. + * The args can use placeholders of the format ${placeholder} as + * part of key/value string. These will be interpolated before passing the + * args to the driver. Currently supported placeholders: + * - ${task_id} + * - ${job_time} + * To pass positional args, set the key as TASK_ARGS. The value should be a + * comma-separated string of all the positional arguments. To use a + * delimiter other than comma, refer to + * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + * other keys being present in the args, then TASK_ARGS will be passed as + * the last argument. + * @type string $service_account + * Required. Service account to use to execute a task. + * If not provided, the default Compute service account for the project is + * used. + * @type string $project + * Optional. The project in which jobs are run. By default, the project + * containing the Lake is used. If a project is provided, the + * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] + * must belong to this project. + * @type \Google\Protobuf\Duration $max_job_execution_lifetime + * Optional. The maximum duration after which the job execution is expired. + * @type string $kms_key + * Optional. The Cloud KMS key to use for encryption, of the form: + * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The arguments to pass to the task. + * The args can use placeholders of the format ${placeholder} as + * part of key/value string. These will be interpolated before passing the + * args to the driver. Currently supported placeholders: + * - ${task_id} + * - ${job_time} + * To pass positional args, set the key as TASK_ARGS. The value should be a + * comma-separated string of all the positional arguments. To use a + * delimiter other than comma, refer to + * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + * other keys being present in the args, then TASK_ARGS will be passed as + * the last argument. + * + * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional. The arguments to pass to the task. + * The args can use placeholders of the format ${placeholder} as + * part of key/value string. These will be interpolated before passing the + * args to the driver. Currently supported placeholders: + * - ${task_id} + * - ${job_time} + * To pass positional args, set the key as TASK_ARGS. The value should be a + * comma-separated string of all the positional arguments. To use a + * delimiter other than comma, refer to + * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + * other keys being present in the args, then TASK_ARGS will be passed as + * the last argument. + * + * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->args = $arr; + + return $this; + } + + /** + * Required. Service account to use to execute a task. + * If not provided, the default Compute service account for the project is + * used. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Required. Service account to use to execute a task. + * If not provided, the default Compute service account for the project is + * used. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. The project in which jobs are run. By default, the project + * containing the Lake is used. If a project is provided, the + * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] + * must belong to this project. + * + * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Optional. The project in which jobs are run. By default, the project + * containing the Lake is used. If a project is provided, the + * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] + * must belong to this project. + * + * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. The maximum duration after which the job execution is expired. + * + * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxJobExecutionLifetime() + { + return $this->max_job_execution_lifetime; + } + + public function hasMaxJobExecutionLifetime() + { + return isset($this->max_job_execution_lifetime); + } + + public function clearMaxJobExecutionLifetime() + { + unset($this->max_job_execution_lifetime); + } + + /** + * Optional. The maximum duration after which the job execution is expired. + * + * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxJobExecutionLifetime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_job_execution_lifetime = $var; + + return $this; + } + + /** + * Optional. The Cloud KMS key to use for encryption, of the form: + * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. + * + * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Optional. The Cloud KMS key to use for encryption, of the form: + * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. + * + * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionSpec::class, \Google\Cloud\Dataplex\V1\Task_ExecutionSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php new file mode 100644 index 000000000000..2abbc0a85df9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php @@ -0,0 +1,124 @@ +google.cloud.dataplex.v1.Task.ExecutionStatus + */ +class ExecutionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. latest job execution + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_job = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of the status. + * @type \Google\Cloud\Dataplex\V1\Job $latest_job + * Output only. latest job execution + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Last update time of the status. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. latest job execution + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\Job|null + */ + public function getLatestJob() + { + return $this->latest_job; + } + + public function hasLatestJob() + { + return isset($this->latest_job); + } + + public function clearLatestJob() + { + unset($this->latest_job); + } + + /** + * Output only. latest job execution + * + * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\Job $var + * @return $this + */ + public function setLatestJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Job::class); + $this->latest_job = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecutionStatus::class, \Google\Cloud\Dataplex\V1\Task_ExecutionStatus::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php new file mode 100644 index 000000000000..3cde74d13131 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php @@ -0,0 +1,162 @@ +google.cloud.dataplex.v1.Task.InfrastructureSpec + */ +class InfrastructureSpec extends \Google\Protobuf\Internal\Message +{ + protected $resources; + protected $runtime; + protected $network; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $batch + * Compute resources needed for a Task when using Dataproc Serverless. + * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $container_image + * Container Image Runtime Configuration. + * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $vpc_network + * Vpc network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Compute resources needed for a Task when using Dataproc Serverless. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52; + * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources|null + */ + public function getBatch() + { + return $this->readOneof(52); + } + + public function hasBatch() + { + return $this->hasOneof(52); + } + + /** + * Compute resources needed for a Task when using Dataproc Serverless. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52; + * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $var + * @return $this + */ + public function setBatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources::class); + $this->writeOneof(52, $var); + + return $this; + } + + /** + * Container Image Runtime Configuration. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101; + * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime|null + */ + public function getContainerImage() + { + return $this->readOneof(101); + } + + public function hasContainerImage() + { + return $this->hasOneof(101); + } + + /** + * Container Image Runtime Configuration. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101; + * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $var + * @return $this + */ + public function setContainerImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Vpc network. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150; + * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork|null + */ + public function getVpcNetwork() + { + return $this->readOneof(150); + } + + public function hasVpcNetwork() + { + return $this->hasOneof(150); + } + + /** + * Vpc network. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150; + * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork::class); + $this->writeOneof(150, $var); + + return $this; + } + + /** + * @return string + */ + public function getResources() + { + return $this->whichOneof("resources"); + } + + /** + * @return string + */ + public function getRuntime() + { + return $this->whichOneof("runtime"); + } + + /** + * @return string + */ + public function getNetwork() + { + return $this->whichOneof("network"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InfrastructureSpec::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php new file mode 100644 index 000000000000..17bcd03b03df --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php @@ -0,0 +1,116 @@ +google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + */ +class BatchComputeResources extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Total number of job executors. + * Executor Count should be between 2 and 100. [Default=2] + * + * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $executors_count = 0; + /** + * Optional. Max configurable executors. + * If max_executors_count > executors_count, then auto-scaling is enabled. + * Max Executor Count should be between 2 and 1000. [Default=1000] + * + * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_executors_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $executors_count + * Optional. Total number of job executors. + * Executor Count should be between 2 and 100. [Default=2] + * @type int $max_executors_count + * Optional. Max configurable executors. + * If max_executors_count > executors_count, then auto-scaling is enabled. + * Max Executor Count should be between 2 and 1000. [Default=1000] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Total number of job executors. + * Executor Count should be between 2 and 100. [Default=2] + * + * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getExecutorsCount() + { + return $this->executors_count; + } + + /** + * Optional. Total number of job executors. + * Executor Count should be between 2 and 100. [Default=2] + * + * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setExecutorsCount($var) + { + GPBUtil::checkInt32($var); + $this->executors_count = $var; + + return $this; + } + + /** + * Optional. Max configurable executors. + * If max_executors_count > executors_count, then auto-scaling is enabled. + * Max Executor Count should be between 2 and 1000. [Default=1000] + * + * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxExecutorsCount() + { + return $this->max_executors_count; + } + + /** + * Optional. Max configurable executors. + * If max_executors_count > executors_count, then auto-scaling is enabled. + * Max Executor Count should be between 2 and 1000. [Default=1000] + * + * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxExecutorsCount($var) + { + GPBUtil::checkInt32($var); + $this->max_executors_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BatchComputeResources::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_BatchComputeResources::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php new file mode 100644 index 000000000000..ea2a1ab8c5d3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php @@ -0,0 +1,204 @@ +google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + */ +class ContainerImageRuntime extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Container image to use. + * + * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image = ''; + /** + * Optional. A list of Java JARS to add to the classpath. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * + * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $java_jars; + /** + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * + * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $python_packages; + /** + * Optional. Override to common configuration of open source components + * installed on the Dataproc cluster. The properties to set on daemon + * config files. Property keys are specified in `prefix:property` format, + * for example `core:hadoop.tmp.dir`. For more information, see [Cluster + * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + * + * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image + * Optional. Container image to use. + * @type array|\Google\Protobuf\Internal\RepeatedField $java_jars + * Optional. A list of Java JARS to add to the classpath. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * @type array|\Google\Protobuf\Internal\RepeatedField $python_packages + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * @type array|\Google\Protobuf\Internal\MapField $properties + * Optional. Override to common configuration of open source components + * installed on the Dataproc cluster. The properties to set on daemon + * config files. Property keys are specified in `prefix:property` format, + * for example `core:hadoop.tmp.dir`. For more information, see [Cluster + * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Container image to use. + * + * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImage() + { + return $this->image; + } + + /** + * Optional. Container image to use. + * + * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkString($var, True); + $this->image = $var; + + return $this; + } + + /** + * Optional. A list of Java JARS to add to the classpath. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * + * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJavaJars() + { + return $this->java_jars; + } + + /** + * Optional. A list of Java JARS to add to the classpath. + * Valid input includes Cloud Storage URIs to Jar binaries. + * For example, gs://bucket-name/my/path/to/file.jar + * + * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJavaJars($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->java_jars = $arr; + + return $this; + } + + /** + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * + * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPythonPackages() + { + return $this->python_packages; + } + + /** + * Optional. A list of python packages to be installed. + * Valid formats include Cloud Storage URI to a PIP installable library. + * For example, gs://bucket-name/my/path/to/lib.tar.gz + * + * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPythonPackages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->python_packages = $arr; + + return $this; + } + + /** + * Optional. Override to common configuration of open source components + * installed on the Dataproc cluster. The properties to set on daemon + * config files. Property keys are specified in `prefix:property` format, + * for example `core:hadoop.tmp.dir`. For more information, see [Cluster + * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + * + * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Optional. Override to common configuration of open source components + * installed on the Dataproc cluster. The properties to set on daemon + * config files. Property keys are specified in `prefix:property` format, + * for example `core:hadoop.tmp.dir`. For more information, see [Cluster + * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + * + * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->properties = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContainerImageRuntime::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_ContainerImageRuntime::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php new file mode 100644 index 000000000000..a276c3e7ee3f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php @@ -0,0 +1,148 @@ +google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + */ +class VpcNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. List of network tags to apply to the job. + * + * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_tags; + protected $network_name; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. The Cloud VPC network in which the job is run. By default, + * the Cloud VPC network named Default within the project is used. + * @type string $sub_network + * Optional. The Cloud VPC sub-network in which the job is run. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * Optional. List of network tags to apply to the job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Cloud VPC network in which the job is run. By default, + * the Cloud VPC network named Default within the project is used. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->readOneof(1); + } + + public function hasNetwork() + { + return $this->hasOneof(1); + } + + /** + * Optional. The Cloud VPC network in which the job is run. By default, + * the Cloud VPC network named Default within the project is used. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. The Cloud VPC sub-network in which the job is run. + * + * Generated from protobuf field string sub_network = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubNetwork() + { + return $this->readOneof(2); + } + + public function hasSubNetwork() + { + return $this->hasOneof(2); + } + + /** + * Optional. The Cloud VPC sub-network in which the job is run. + * + * Generated from protobuf field string sub_network = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubNetwork($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. List of network tags to apply to the job. + * + * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * Optional. List of network tags to apply to the job. + * + * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + + /** + * @return string + */ + public function getNetworkName() + { + return $this->whichOneof("network_name"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VpcNetwork::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_VpcNetwork::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php new file mode 100644 index 000000000000..b3c61eecd7aa --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php @@ -0,0 +1,206 @@ +google.cloud.dataplex.v1.Task.NotebookTaskConfig + */ +class NotebookTaskConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Path to input notebook. This can be the Cloud Storage URI of + * the notebook file or the path to a Notebook Content. The execution args + * are accessible as environment variables + * (`TASK_key=value`). + * + * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notebook = ''; + /** + * Optional. Infrastructure specification for the execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $infrastructure_spec = null; + /** + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * + * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $file_uris; + /** + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * + * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $archive_uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notebook + * Required. Path to input notebook. This can be the Cloud Storage URI of + * the notebook file or the path to a Notebook Content. The execution args + * are accessible as environment variables + * (`TASK_key=value`). + * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $infrastructure_spec + * Optional. Infrastructure specification for the execution. + * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. Path to input notebook. This can be the Cloud Storage URI of + * the notebook file or the path to a Notebook Content. The execution args + * are accessible as environment variables + * (`TASK_key=value`). + * + * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNotebook() + { + return $this->notebook; + } + + /** + * Required. Path to input notebook. This can be the Cloud Storage URI of + * the notebook file or the path to a Notebook Content. The execution args + * are accessible as environment variables + * (`TASK_key=value`). + * + * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNotebook($var) + { + GPBUtil::checkString($var, True); + $this->notebook = $var; + + return $this; + } + + /** + * Optional. Infrastructure specification for the execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec|null + */ + public function getInfrastructureSpec() + { + return $this->infrastructure_spec; + } + + public function hasInfrastructureSpec() + { + return isset($this->infrastructure_spec); + } + + public function clearInfrastructureSpec() + { + unset($this->infrastructure_spec); + } + + /** + * Optional. Infrastructure specification for the execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $var + * @return $this + */ + public function setInfrastructureSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec::class); + $this->infrastructure_spec = $var; + + return $this; + } + + /** + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * + * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFileUris() + { + return $this->file_uris; + } + + /** + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * + * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFileUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->file_uris = $arr; + + return $this; + } + + /** + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * + * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArchiveUris() + { + return $this->archive_uris; + } + + /** + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * + * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArchiveUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->archive_uris = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NotebookTaskConfig::class, \Google\Cloud\Dataplex\V1\Task_NotebookTaskConfig::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php new file mode 100644 index 000000000000..48bab1ddccf1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php @@ -0,0 +1,373 @@ +google.cloud.dataplex.v1.Task.SparkTaskConfig + */ +class SparkTaskConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * + * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $file_uris; + /** + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * + * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $archive_uris; + /** + * Optional. Infrastructure specification for the execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $infrastructure_spec = null; + protected $driver; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $main_jar_file_uri + * The Cloud Storage URI of the jar file that contains the main class. + * The execution args are passed in as a sequence of named process + * arguments (`--key=value`). + * @type string $main_class + * The name of the driver's main class. The jar file that contains the + * class must be in the default CLASSPATH or specified in + * `jar_file_uris`. + * The execution args are passed in as a sequence of named process + * arguments (`--key=value`). + * @type string $python_script_file + * The Gcloud Storage URI of the main Python file to use as the driver. + * Must be a .py file. The execution args are passed in as a sequence of + * named process arguments (`--key=value`). + * @type string $sql_script_file + * A reference to a query file. This can be the Cloud Storage URI of the + * query file or it can the path to a SqlScript Content. The execution + * args are used to declare a set of script variables + * (`set key="value";`). + * @type string $sql_script + * The query text. + * The execution args are used to declare a set of script variables + * (`set key="value";`). + * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $infrastructure_spec + * Optional. Infrastructure specification for the execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage URI of the jar file that contains the main class. + * The execution args are passed in as a sequence of named process + * arguments (`--key=value`). + * + * Generated from protobuf field string main_jar_file_uri = 100; + * @return string + */ + public function getMainJarFileUri() + { + return $this->readOneof(100); + } + + public function hasMainJarFileUri() + { + return $this->hasOneof(100); + } + + /** + * The Cloud Storage URI of the jar file that contains the main class. + * The execution args are passed in as a sequence of named process + * arguments (`--key=value`). + * + * Generated from protobuf field string main_jar_file_uri = 100; + * @param string $var + * @return $this + */ + public function setMainJarFileUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * The name of the driver's main class. The jar file that contains the + * class must be in the default CLASSPATH or specified in + * `jar_file_uris`. + * The execution args are passed in as a sequence of named process + * arguments (`--key=value`). + * + * Generated from protobuf field string main_class = 101; + * @return string + */ + public function getMainClass() + { + return $this->readOneof(101); + } + + public function hasMainClass() + { + return $this->hasOneof(101); + } + + /** + * The name of the driver's main class. The jar file that contains the + * class must be in the default CLASSPATH or specified in + * `jar_file_uris`. + * The execution args are passed in as a sequence of named process + * arguments (`--key=value`). + * + * Generated from protobuf field string main_class = 101; + * @param string $var + * @return $this + */ + public function setMainClass($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * The Gcloud Storage URI of the main Python file to use as the driver. + * Must be a .py file. The execution args are passed in as a sequence of + * named process arguments (`--key=value`). + * + * Generated from protobuf field string python_script_file = 102; + * @return string + */ + public function getPythonScriptFile() + { + return $this->readOneof(102); + } + + public function hasPythonScriptFile() + { + return $this->hasOneof(102); + } + + /** + * The Gcloud Storage URI of the main Python file to use as the driver. + * Must be a .py file. The execution args are passed in as a sequence of + * named process arguments (`--key=value`). + * + * Generated from protobuf field string python_script_file = 102; + * @param string $var + * @return $this + */ + public function setPythonScriptFile($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * A reference to a query file. This can be the Cloud Storage URI of the + * query file or it can the path to a SqlScript Content. The execution + * args are used to declare a set of script variables + * (`set key="value";`). + * + * Generated from protobuf field string sql_script_file = 104; + * @return string + */ + public function getSqlScriptFile() + { + return $this->readOneof(104); + } + + public function hasSqlScriptFile() + { + return $this->hasOneof(104); + } + + /** + * A reference to a query file. This can be the Cloud Storage URI of the + * query file or it can the path to a SqlScript Content. The execution + * args are used to declare a set of script variables + * (`set key="value";`). + * + * Generated from protobuf field string sql_script_file = 104; + * @param string $var + * @return $this + */ + public function setSqlScriptFile($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(104, $var); + + return $this; + } + + /** + * The query text. + * The execution args are used to declare a set of script variables + * (`set key="value";`). + * + * Generated from protobuf field string sql_script = 105; + * @return string + */ + public function getSqlScript() + { + return $this->readOneof(105); + } + + public function hasSqlScript() + { + return $this->hasOneof(105); + } + + /** + * The query text. + * The execution args are used to declare a set of script variables + * (`set key="value";`). + * + * Generated from protobuf field string sql_script = 105; + * @param string $var + * @return $this + */ + public function setSqlScript($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(105, $var); + + return $this; + } + + /** + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * + * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFileUris() + { + return $this->file_uris; + } + + /** + * Optional. Cloud Storage URIs of files to be placed in the working + * directory of each executor. + * + * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFileUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->file_uris = $arr; + + return $this; + } + + /** + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * + * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArchiveUris() + { + return $this->archive_uris; + } + + /** + * Optional. Cloud Storage URIs of archives to be extracted into the working + * directory of each executor. Supported file types: .jar, .tar, .tar.gz, + * .tgz, and .zip. + * + * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArchiveUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->archive_uris = $arr; + + return $this; + } + + /** + * Optional. Infrastructure specification for the execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec|null + */ + public function getInfrastructureSpec() + { + return $this->infrastructure_spec; + } + + public function hasInfrastructureSpec() + { + return isset($this->infrastructure_spec); + } + + public function clearInfrastructureSpec() + { + unset($this->infrastructure_spec); + } + + /** + * Optional. Infrastructure specification for the execution. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $var + * @return $this + */ + public function setInfrastructureSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec::class); + $this->infrastructure_spec = $var; + + return $this; + } + + /** + * @return string + */ + public function getDriver() + { + return $this->whichOneof("driver"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SparkTaskConfig::class, \Google\Cloud\Dataplex\V1\Task_SparkTaskConfig::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php new file mode 100644 index 000000000000..dc0980070345 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php @@ -0,0 +1,262 @@ +google.cloud.dataplex.v1.Task.TriggerSpec + */ +class TriggerSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. Trigger type of the user-specified Task. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Optional. The first run of the task will be after this time. + * If not specified, the task will run shortly after being submitted if + * ON_DEMAND and based on the schedule if RECURRING. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $start_time = null; + /** + * Optional. Prevent the task from executing. + * This does not cancel already running tasks. It is intended to temporarily + * disable RECURRING tasks. + * + * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disabled = false; + /** + * Optional. Number of retry attempts before aborting. + * Set to zero to never attempt to retry a failed task. + * + * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_retries = 0; + protected $trigger; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. Immutable. Trigger type of the user-specified Task. + * @type \Google\Protobuf\Timestamp $start_time + * Optional. The first run of the task will be after this time. + * If not specified, the task will run shortly after being submitted if + * ON_DEMAND and based on the schedule if RECURRING. + * @type bool $disabled + * Optional. Prevent the task from executing. + * This does not cancel already running tasks. It is intended to temporarily + * disable RECURRING tasks. + * @type int $max_retries + * Optional. Number of retry attempts before aborting. + * Set to zero to never attempt to retry a failed task. + * @type string $schedule + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running tasks periodically. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid + * string from IANA time zone database. For example, + * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * + * *`. This field is required for RECURRING tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. Trigger type of the user-specified Task. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Immutable. Trigger type of the user-specified Task. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. The first run of the task will be after this time. + * If not specified, the task will run shortly after being submitted if + * ON_DEMAND and based on the schedule if RECURRING. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Optional. The first run of the task will be after this time. + * If not specified, the task will run shortly after being submitted if + * ON_DEMAND and based on the schedule if RECURRING. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Optional. Prevent the task from executing. + * This does not cancel already running tasks. It is intended to temporarily + * disable RECURRING tasks. + * + * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Optional. Prevent the task from executing. + * This does not cancel already running tasks. It is intended to temporarily + * disable RECURRING tasks. + * + * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * Optional. Number of retry attempts before aborting. + * Set to zero to never attempt to retry a failed task. + * + * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxRetries() + { + return $this->max_retries; + } + + /** + * Optional. Number of retry attempts before aborting. + * Set to zero to never attempt to retry a failed task. + * + * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxRetries($var) + { + GPBUtil::checkInt32($var); + $this->max_retries = $var; + + return $this; + } + + /** + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running tasks periodically. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid + * string from IANA time zone database. For example, + * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * + * *`. This field is required for RECURRING tasks. + * + * Generated from protobuf field string schedule = 100 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSchedule() + { + return $this->readOneof(100); + } + + public function hasSchedule() + { + return $this->hasOneof(100); + } + + /** + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running tasks periodically. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid + * string from IANA time zone database. For example, + * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * + * *`. This field is required for RECURRING tasks. + * + * Generated from protobuf field string schedule = 100 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * @return string + */ + public function getTrigger() + { + return $this->whichOneof("trigger"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TriggerSpec::class, \Google\Cloud\Dataplex\V1\Task_TriggerSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php new file mode 100644 index 000000000000..c9aaf3812924 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.Task.TriggerSpec.Type + */ +class Type +{ + /** + * Unspecified trigger type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * The task runs one-time shortly after Task Creation. + * + * Generated from protobuf enum ON_DEMAND = 1; + */ + const ON_DEMAND = 1; + /** + * The task is scheduled to run periodically. + * + * Generated from protobuf enum RECURRING = 2; + */ + const RECURRING = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ON_DEMAND => 'ON_DEMAND', + self::RECURRING => 'RECURRING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Dataplex\V1\Task_TriggerSpec_Type::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php new file mode 100644 index 000000000000..2e7aa5b11786 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php @@ -0,0 +1,108 @@ +google.cloud.dataplex.v1.Trigger + */ +class Trigger extends \Google\Protobuf\Internal\Message +{ + protected $mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\Trigger\OnDemand $on_demand + * The scan runs once via `RunDataScan` API. + * @type \Google\Cloud\Dataplex\V1\Trigger\Schedule $schedule + * The scan is scheduled to run periodically. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); + parent::__construct($data); + } + + /** + * The scan runs once via `RunDataScan` API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.OnDemand on_demand = 100; + * @return \Google\Cloud\Dataplex\V1\Trigger\OnDemand|null + */ + public function getOnDemand() + { + return $this->readOneof(100); + } + + public function hasOnDemand() + { + return $this->hasOneof(100); + } + + /** + * The scan runs once via `RunDataScan` API. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.OnDemand on_demand = 100; + * @param \Google\Cloud\Dataplex\V1\Trigger\OnDemand $var + * @return $this + */ + public function setOnDemand($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger\OnDemand::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * The scan is scheduled to run periodically. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.Schedule schedule = 101; + * @return \Google\Cloud\Dataplex\V1\Trigger\Schedule|null + */ + public function getSchedule() + { + return $this->readOneof(101); + } + + public function hasSchedule() + { + return $this->hasOneof(101); + } + + /** + * The scan is scheduled to run periodically. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.Schedule schedule = 101; + * @param \Google\Cloud\Dataplex\V1\Trigger\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger\Schedule::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->whichOneof("mode"); + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php new file mode 100644 index 000000000000..610340b74866 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php @@ -0,0 +1,36 @@ +google.cloud.dataplex.v1.Trigger.OnDemand + */ +class OnDemand extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OnDemand::class, \Google\Cloud\Dataplex\V1\Trigger_OnDemand::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php new file mode 100644 index 000000000000..af91f3470b71 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php @@ -0,0 +1,106 @@ +google.cloud.dataplex.v1.Trigger.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running + * scans periodically. + * To explicitly set a timezone in the cron tab, apply a prefix in the + * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. + * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone + * database + * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). + * For example, `CRON_TZ=America/New_York 1 * * * *`, or + * `TZ=America/New_York 1 * * * *`. + * This field is required for Schedule scans. + * + * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cron = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cron + * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running + * scans periodically. + * To explicitly set a timezone in the cron tab, apply a prefix in the + * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. + * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone + * database + * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). + * For example, `CRON_TZ=America/New_York 1 * * * *`, or + * `TZ=America/New_York 1 * * * *`. + * This field is required for Schedule scans. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); + parent::__construct($data); + } + + /** + * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running + * scans periodically. + * To explicitly set a timezone in the cron tab, apply a prefix in the + * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. + * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone + * database + * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). + * For example, `CRON_TZ=America/New_York 1 * * * *`, or + * `TZ=America/New_York 1 * * * *`. + * This field is required for Schedule scans. + * + * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCron() + { + return $this->cron; + } + + /** + * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running + * scans periodically. + * To explicitly set a timezone in the cron tab, apply a prefix in the + * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. + * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone + * database + * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). + * For example, `CRON_TZ=America/New_York 1 * * * *`, or + * `TZ=America/New_York 1 * * * *`. + * This field is required for Schedule scans. + * + * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCron($var) + { + GPBUtil::checkString($var, True); + $this->cron = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Schedule::class, \Google\Cloud\Dataplex\V1\Trigger_Schedule::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php new file mode 100644 index 000000000000..f421fa15d2da --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php @@ -0,0 +1,179 @@ +google.cloud.dataplex.v1.UpdateAssetRequest + */ +class UpdateAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\Asset $asset Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateAssetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\Asset $asset, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAsset($asset) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\Asset $asset + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php new file mode 100644 index 000000000000..8cfa2d28aa8c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php @@ -0,0 +1,179 @@ +google.cloud.dataplex.v1.UpdateContentRequest + */ +class UpdateContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $content = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\Content $content Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateContentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\Content $content, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setContent($content) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\Content $content + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Content|null + */ + public function getContent() + { + return $this->content; + } + + public function hasContent() + { + return isset($this->content); + } + + public function clearContent() + { + unset($this->content); + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Content $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content::class); + $this->content = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php new file mode 100644 index 000000000000..5287c980b60d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php @@ -0,0 +1,174 @@ +google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + */ +class UpdateDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_attribute_binding = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding Required. Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateDataAttributeBindingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataAttributeBinding($dataAttributeBinding) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\DataAttributeBinding $data_attribute_binding + * Required. Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding|null + */ + public function getDataAttributeBinding() + { + return $this->data_attribute_binding; + } + + public function hasDataAttributeBinding() + { + return isset($this->data_attribute_binding); + } + + public function clearDataAttributeBinding() + { + unset($this->data_attribute_binding); + } + + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $var + * @return $this + */ + public function setDataAttributeBinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); + $this->data_attribute_binding = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php new file mode 100644 index 000000000000..c9f4468b8962 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php @@ -0,0 +1,174 @@ +google.cloud.dataplex.v1.UpdateDataAttributeRequest + */ +class UpdateDataAttributeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_attribute = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute Required. Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateDataAttributeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataAttribute($dataAttribute) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\DataAttribute $data_attribute + * Required. Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataAttribute|null + */ + public function getDataAttribute() + { + return $this->data_attribute; + } + + public function hasDataAttribute() + { + return isset($this->data_attribute); + } + + public function clearDataAttribute() + { + unset($this->data_attribute); + } + + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataAttribute $var + * @return $this + */ + public function setDataAttribute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttribute::class); + $this->data_attribute = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php new file mode 100644 index 000000000000..5604a49c4fcd --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php @@ -0,0 +1,180 @@ +google.cloud.dataplex.v1.UpdateDataScanRequest + */ +class UpdateDataScanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. DataScan resource to be updated. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_scan = null; + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\DataScan $dataScan Required. DataScan resource to be updated. + * + * Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateDataScanRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\DataScan $dataScan, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataScan($dataScan) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\DataScan $data_scan + * Required. DataScan resource to be updated. + * Only fields specified in `update_mask` are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); + parent::__construct($data); + } + + /** + * Required. DataScan resource to be updated. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataScan|null + */ + public function getDataScan() + { + return $this->data_scan; + } + + public function hasDataScan() + { + return isset($this->data_scan); + } + + public function clearDataScan() + { + unset($this->data_scan); + } + + /** + * Required. DataScan resource to be updated. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataScan $var + * @return $this + */ + public function setDataScan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan::class); + $this->data_scan = $var; + + return $this; + } + + /** + * Required. Mask 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. Mask 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; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php new file mode 100644 index 000000000000..ccd50e68d9f3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php @@ -0,0 +1,174 @@ +google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + */ +class UpdateDataTaxonomyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_taxonomy = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy Required. Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateDataTaxonomyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataTaxonomy($dataTaxonomy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\DataTaxonomy $data_taxonomy + * Required. Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\DataTaxonomy|null + */ + public function getDataTaxonomy() + { + return $this->data_taxonomy; + } + + public function hasDataTaxonomy() + { + return isset($this->data_taxonomy); + } + + public function clearDataTaxonomy() + { + unset($this->data_taxonomy); + } + + /** + * Required. Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $var + * @return $this + */ + public function setDataTaxonomy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); + $this->data_taxonomy = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php new file mode 100644 index 000000000000..5f94268620ee --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php @@ -0,0 +1,118 @@ +google.cloud.dataplex.v1.UpdateEntityRequest + */ +class UpdateEntityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Update description. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataplex\V1\Entity $entity + * Required. Update description. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. Update description. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Required. Update description. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity::class); + $this->entity = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php new file mode 100644 index 000000000000..18909b9f1a6f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php @@ -0,0 +1,179 @@ +google.cloud.dataplex.v1.UpdateEnvironmentRequest + */ +class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\Environment $environment Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateEnvironmentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\Environment $environment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEnvironment($environment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\Environment $environment + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php new file mode 100644 index 000000000000..c5c44f9d47d7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php @@ -0,0 +1,179 @@ +google.cloud.dataplex.v1.UpdateLakeRequest + */ +class UpdateLakeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lake = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\Lake $lake Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateLakeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\Lake $lake, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setLake($lake) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\Lake $lake + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Lake|null + */ + public function getLake() + { + return $this->lake; + } + + public function hasLake() + { + return isset($this->lake); + } + + public function clearLake() + { + unset($this->lake); + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Lake $var + * @return $this + */ + public function setLake($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake::class); + $this->lake = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php new file mode 100644 index 000000000000..5d56568c9c29 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php @@ -0,0 +1,179 @@ +google.cloud.dataplex.v1.UpdateTaskRequest + */ +class UpdateTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\Task $task Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateTaskRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\Task $task, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTask($task) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\Task $task + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Task|null + */ + public function getTask() + { + return $this->task; + } + + public function hasTask() + { + return isset($this->task); + } + + public function clearTask() + { + unset($this->task); + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Task $var + * @return $this + */ + public function setTask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task::class); + $this->task = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php new file mode 100644 index 000000000000..9b7a5d586fa7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php @@ -0,0 +1,179 @@ +google.cloud.dataplex.v1.UpdateZoneRequest + */ +class UpdateZoneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $zone = null; + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Dataplex\V1\Zone $zone Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\Dataplex\V1\UpdateZoneRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataplex\V1\Zone $zone, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setZone($zone) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Dataplex\V1\Zone $zone + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @type bool $validate_only + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Zone|null + */ + public function getZone() + { + return $this->zone; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Zone $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone::class); + $this->zone = $var; + + return $this; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php new file mode 100644 index 000000000000..271b517cd808 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php @@ -0,0 +1,510 @@ +google.cloud.dataplex.v1.Zone + */ +class Zone extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. System generated globally unique ID for the zone. This ID will + * be different if the zone is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The time when the zone 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 when the zone was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User defined labels for the zone. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of the zone. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Current state of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Immutable. The type of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Optional. Specification of the discovery feature applied to data in this + * zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $discovery_spec = null; + /** + * Required. Specification of the resources that are referenced by the assets + * within this zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_spec = null; + /** + * Output only. Aggregated status of the underlying assets of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @type string $display_name + * Optional. User friendly display name. + * @type string $uid + * Output only. System generated globally unique ID for the zone. This ID will + * be different if the zone is deleted and re-created with the same name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the zone was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the zone was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User defined labels for the zone. + * @type string $description + * Optional. Description of the zone. + * @type int $state + * Output only. Current state of the zone. + * @type int $type + * Required. Immutable. The type of the zone. + * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec $discovery_spec + * Optional. Specification of the discovery feature applied to data in this + * zone. + * @type \Google\Cloud\Dataplex\V1\Zone\ResourceSpec $resource_spec + * Required. Specification of the resources that are referenced by the assets + * within this zone. + * @type \Google\Cloud\Dataplex\V1\AssetStatus $asset_status + * Output only. Aggregated status of the underlying assets of the zone. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The relative resource name of the zone, of the form: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. System generated globally unique ID for the zone. This ID will + * be different if the zone is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System generated globally unique ID for the zone. This ID will + * be different if the zone is deleted and re-created with the same name. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The time when the zone 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 when the zone 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 when the zone 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 when the zone 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; + } + + /** + * Optional. User defined labels for the zone. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User defined labels for the zone. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Description of the zone. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the zone. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Current state of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Immutable. The type of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Immutable. The type of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Zone\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. Specification of the discovery feature applied to data in this + * zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec|null + */ + public function getDiscoverySpec() + { + return $this->discovery_spec; + } + + public function hasDiscoverySpec() + { + return isset($this->discovery_spec); + } + + public function clearDiscoverySpec() + { + unset($this->discovery_spec); + } + + /** + * Optional. Specification of the discovery feature applied to data in this + * zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec $var + * @return $this + */ + public function setDiscoverySpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec::class); + $this->discovery_spec = $var; + + return $this; + } + + /** + * Required. Specification of the resources that are referenced by the assets + * within this zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataplex\V1\Zone\ResourceSpec|null + */ + public function getResourceSpec() + { + return $this->resource_spec; + } + + public function hasResourceSpec() + { + return isset($this->resource_spec); + } + + public function clearResourceSpec() + { + unset($this->resource_spec); + } + + /** + * Required. Specification of the resources that are referenced by the assets + * within this zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataplex\V1\Zone\ResourceSpec $var + * @return $this + */ + public function setResourceSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\ResourceSpec::class); + $this->resource_spec = $var; + + return $this; + } + + /** + * Output only. Aggregated status of the underlying assets of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Dataplex\V1\AssetStatus|null + */ + public function getAssetStatus() + { + return $this->asset_status; + } + + public function hasAssetStatus() + { + return isset($this->asset_status); + } + + public function clearAssetStatus() + { + unset($this->asset_status); + } + + /** + * Output only. Aggregated status of the underlying assets of the zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Dataplex\V1\AssetStatus $var + * @return $this + */ + public function setAssetStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AssetStatus::class); + $this->asset_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php new file mode 100644 index 000000000000..798a3a5f6b4a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php @@ -0,0 +1,317 @@ +google.cloud.dataplex.v1.Zone.DiscoverySpec + */ +class DiscoverySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Whether discovery is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $enabled = false; + /** + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * + * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $include_patterns; + /** + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * + * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $exclude_patterns; + /** + * Optional. Configuration for CSV data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $csv_options = null; + /** + * Optional. Configuration for Json data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $json_options = null; + protected $trigger; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Required. Whether discovery is enabled. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_patterns + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_patterns + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions $csv_options + * Optional. Configuration for CSV data. + * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions $json_options + * Optional. Configuration for Json data. + * @type string $schedule + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running discovery periodically. Successive discovery runs must be + * scheduled at least 60 minutes apart. The default value is to run + * discovery every 60 minutes. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + * * * * *`, or `TZ=America/New_York 1 * * * *`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Whether discovery is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Required. Whether discovery is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * + * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludePatterns() + { + return $this->include_patterns; + } + + /** + * Optional. The list of patterns to apply for selecting data to include + * during discovery if only a subset of the data should considered. For + * Cloud Storage bucket assets, these are interpreted as glob patterns used + * to match object names. For BigQuery dataset assets, these are interpreted + * as patterns to match table names. + * + * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludePatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_patterns = $arr; + + return $this; + } + + /** + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * + * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludePatterns() + { + return $this->exclude_patterns; + } + + /** + * Optional. The list of patterns to apply for selecting data to exclude + * during discovery. For Cloud Storage bucket assets, these are interpreted + * as glob patterns used to match object names. For BigQuery dataset assets, + * these are interpreted as patterns to match table names. + * + * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludePatterns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclude_patterns = $arr; + + return $this; + } + + /** + * Optional. Configuration for CSV data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions|null + */ + public function getCsvOptions() + { + return $this->csv_options; + } + + public function hasCsvOptions() + { + return isset($this->csv_options); + } + + public function clearCsvOptions() + { + unset($this->csv_options); + } + + /** + * Optional. Configuration for CSV data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions $var + * @return $this + */ + public function setCsvOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions::class); + $this->csv_options = $var; + + return $this; + } + + /** + * Optional. Configuration for Json data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions|null + */ + public function getJsonOptions() + { + return $this->json_options; + } + + public function hasJsonOptions() + { + return isset($this->json_options); + } + + public function clearJsonOptions() + { + unset($this->json_options); + } + + /** + * Optional. Configuration for Json data. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions $var + * @return $this + */ + public function setJsonOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions::class); + $this->json_options = $var; + + return $this; + } + + /** + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running discovery periodically. Successive discovery runs must be + * scheduled at least 60 minutes apart. The default value is to run + * discovery every 60 minutes. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + * * * * *`, or `TZ=America/New_York 1 * * * *`. + * + * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSchedule() + { + return $this->readOneof(10); + } + + public function hasSchedule() + { + return $this->hasOneof(10); + } + + /** + * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + * running discovery periodically. Successive discovery runs must be + * scheduled at least 60 minutes apart. The default value is to run + * discovery every 60 minutes. To explicitly set a timezone to the cron + * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + * * * * *`, or `TZ=America/New_York 1 * * * *`. + * + * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getTrigger() + { + return $this->whichOneof("trigger"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiscoverySpec::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php new file mode 100644 index 000000000000..fe2a4ee14034 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php @@ -0,0 +1,184 @@ +google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + */ +class CsvOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * + * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header_rows = 0; + /** + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * + * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delimiter = ''; + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encoding = ''; + /** + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * + * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_type_inference = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $header_rows + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * @type string $delimiter + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * @type string $encoding + * Optional. The character encoding of the data. The default is UTF-8. + * @type bool $disable_type_inference + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * + * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getHeaderRows() + { + return $this->header_rows; + } + + /** + * Optional. The number of rows to interpret as header rows that should be + * skipped when reading data rows. + * + * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setHeaderRows($var) + { + GPBUtil::checkInt32($var); + $this->header_rows = $var; + + return $this; + } + + /** + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * + * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Optional. The delimiter being used to separate values. This defaults to + * ','. + * + * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDelimiter($var) + { + GPBUtil::checkString($var, True); + $this->delimiter = $var; + + return $this; + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * + * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisableTypeInference() + { + return $this->disable_type_inference; + } + + /** + * Optional. Whether to disable the inference of data type for CSV data. + * If true, all columns will be registered as strings. + * + * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisableTypeInference($var) + { + GPBUtil::checkBool($var); + $this->disable_type_inference = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec_CsvOptions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php new file mode 100644 index 000000000000..8d990855a450 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php @@ -0,0 +1,112 @@ +google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + */ +class JsonOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encoding = ''; + /** + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * + * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_type_inference = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $encoding + * Optional. The character encoding of the data. The default is UTF-8. + * @type bool $disable_type_inference + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Optional. The character encoding of the data. The default is UTF-8. + * + * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * + * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisableTypeInference() + { + return $this->disable_type_inference; + } + + /** + * Optional. Whether to disable the inference of data type for Json data. + * If true, all columns will be registered as their primitive types + * (strings, number or boolean). + * + * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisableTypeInference($var) + { + GPBUtil::checkBool($var); + $this->disable_type_inference = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec_JsonOptions::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php new file mode 100644 index 000000000000..e36f7d5ebfb3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php @@ -0,0 +1,74 @@ +google.cloud.dataplex.v1.Zone.ResourceSpec + */ +class ResourceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. The location type of the resources that are allowed + * to be attached to the assets within this zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $location_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $location_type + * Required. Immutable. The location type of the resources that are allowed + * to be attached to the assets within this zone. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. The location type of the resources that are allowed + * to be attached to the assets within this zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getLocationType() + { + return $this->location_type; + } + + /** + * Required. Immutable. The location type of the resources that are allowed + * to be attached to the assets within this zone. + * + * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setLocationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Zone\ResourceSpec\LocationType::class); + $this->location_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceSpec::class, \Google\Cloud\Dataplex\V1\Zone_ResourceSpec::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php new file mode 100644 index 000000000000..4720281da7ba --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php @@ -0,0 +1,64 @@ +google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType + */ +class LocationType +{ + /** + * Unspecified location type. + * + * Generated from protobuf enum LOCATION_TYPE_UNSPECIFIED = 0; + */ + const LOCATION_TYPE_UNSPECIFIED = 0; + /** + * Resources that are associated with a single region. + * + * Generated from protobuf enum SINGLE_REGION = 1; + */ + const SINGLE_REGION = 1; + /** + * Resources that are associated with a multi-region location. + * + * Generated from protobuf enum MULTI_REGION = 2; + */ + const MULTI_REGION = 2; + + private static $valueToName = [ + self::LOCATION_TYPE_UNSPECIFIED => 'LOCATION_TYPE_UNSPECIFIED', + self::SINGLE_REGION => 'SINGLE_REGION', + self::MULTI_REGION => 'MULTI_REGION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LocationType::class, \Google\Cloud\Dataplex\V1\Zone_ResourceSpec_LocationType::class); + diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php new file mode 100644 index 000000000000..dca85b04561e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php @@ -0,0 +1,68 @@ +google.cloud.dataplex.v1.Zone.Type + */ +class Type +{ + /** + * Zone type not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * A zone that contains data that needs further processing before it is + * considered generally ready for consumption and analytics workloads. + * + * Generated from protobuf enum RAW = 1; + */ + const RAW = 1; + /** + * A zone that contains data that is considered to be ready for broader + * consumption and analytics workloads. Curated structured data stored in + * Cloud Storage must conform to certain file formats (parquet, avro and + * orc) and organized in a hive-compatible directory layout. + * + * Generated from protobuf enum CURATED = 2; + */ + const CURATED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::RAW => 'RAW', + self::CURATED => 'CURATED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Dataplex\V1\Zone_Type::class); + diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php new file mode 100644 index 000000000000..e93d2f09716a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php @@ -0,0 +1,85 @@ +setPath($contentPath) + ->setDataText($contentDataText); + $request = (new CreateContentRequest()) + ->setParent($formattedParent) + ->setContent($content); + + // Call the API and handle any network failures. + try { + /** @var Content $response */ + $response = $contentServiceClient->createContent($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 = ContentServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $contentPath = '[PATH]'; + $contentDataText = '[DATA_TEXT]'; + + create_content_sample($formattedParent, $contentPath, $contentDataText); +} +// [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php new file mode 100644 index 000000000000..ff071e6f17dc --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $contentServiceClient->deleteContent($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 = ContentServiceClient::contentName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[CONTENT]' + ); + + delete_content_sample($formattedName); +} +// [END dataplex_v1_generated_ContentService_DeleteContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php new file mode 100644 index 000000000000..74f4a09b745a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Content $response */ + $response = $contentServiceClient->getContent($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 = ContentServiceClient::contentName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[CONTENT]' + ); + + get_content_sample($formattedName); +} +// [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..ad7081cb0b1e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php @@ -0,0 +1,76 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $contentServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_ContentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php new file mode 100644 index 000000000000..b348902ce6dd --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dataplex_v1_generated_ContentService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php new file mode 100644 index 000000000000..ed40430ad270 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contentServiceClient->listContent($request); + + /** @var Content $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 = ContentServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + + list_content_sample($formattedParent); +} +// [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php new file mode 100644 index 000000000000..6c5bbc8a769e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $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()); + } +} +// [END dataplex_v1_generated_ContentService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..d8c92f530960 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $contentServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_ContentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..a276ac61efec --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php @@ -0,0 +1,87 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $contentServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php new file mode 100644 index 000000000000..688c85bc6a90 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php @@ -0,0 +1,80 @@ +setPath($contentPath) + ->setDataText($contentDataText); + $request = (new UpdateContentRequest()) + ->setUpdateMask($updateMask) + ->setContent($content); + + // Call the API and handle any network failures. + try { + /** @var Content $response */ + $response = $contentServiceClient->updateContent($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 +{ + $contentPath = '[PATH]'; + $contentDataText = '[DATA_TEXT]'; + + update_content_sample($contentPath, $contentDataText); +} +// [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php new file mode 100644 index 000000000000..a6acf9599d4d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php @@ -0,0 +1,100 @@ +setData($dataScanData); + $request = (new CreateDataScanRequest()) + ->setParent($formattedParent) + ->setDataScan($dataScan) + ->setDataScanId($dataScanId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataScanServiceClient->createDataScan($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataScan $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 = DataScanServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $dataScanId = '[DATA_SCAN_ID]'; + + create_data_scan_sample($formattedParent, $dataScanId); +} +// [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php new file mode 100644 index 000000000000..b0e0dc9cadfc --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataScanServiceClient->deleteDataScan($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + + delete_data_scan_sample($formattedName); +} +// [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php new file mode 100644 index 000000000000..cd47d8e1e770 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataScan $response */ + $response = $dataScanServiceClient->getDataScan($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 = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + + get_data_scan_sample($formattedName); +} +// [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php new file mode 100644 index 000000000000..6560d161619f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataScanJob $response */ + $response = $dataScanServiceClient->getDataScanJob($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 = DataScanServiceClient::dataScanJobName( + '[PROJECT]', + '[LOCATION]', + '[DATASCAN]', + '[JOB]' + ); + + get_data_scan_job_sample($formattedName); +} +// [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..741fdc59700e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataScanServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_DataScanService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php new file mode 100644 index 000000000000..b9d32e8172a1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dataplex_v1_generated_DataScanService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php new file mode 100644 index 000000000000..b3594d654c11 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataScanServiceClient->listDataScanJobs($request); + + /** @var DataScanJob $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 = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + + list_data_scan_jobs_sample($formattedParent); +} +// [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php new file mode 100644 index 000000000000..039d010b8b3f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataScanServiceClient->listDataScans($request); + + /** @var DataScan $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 = DataScanServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_data_scans_sample($formattedParent); +} +// [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php new file mode 100644 index 000000000000..9948c040a261 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $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()); + } +} +// [END dataplex_v1_generated_DataScanService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php new file mode 100644 index 000000000000..4d8ee5506801 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RunDataScanResponse $response */ + $response = $dataScanServiceClient->runDataScan($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 = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + + run_data_scan_sample($formattedName); +} +// [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..e2d2ecc99189 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataScanServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_DataScanService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..59e98e72093d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $dataScanServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataplex_v1_generated_DataScanService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php new file mode 100644 index 000000000000..1fb12c9b56ad --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php @@ -0,0 +1,77 @@ +setData($dataScanData); + $updateMask = new FieldMask(); + $request = (new UpdateDataScanRequest()) + ->setDataScan($dataScan) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataScanServiceClient->updateDataScan($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataScan $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()); + } +} +// [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php new file mode 100644 index 000000000000..22d3016d4695 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setDataAttributeId($dataAttributeId) + ->setDataAttribute($dataAttribute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->createDataAttribute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataAttribute $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 = DataTaxonomyServiceClient::dataTaxonomyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_TAXONOMY_ID]' + ); + $dataAttributeId = '[DATA_ATTRIBUTE_ID]'; + + create_data_attribute_sample($formattedParent, $dataAttributeId); +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php new file mode 100644 index 000000000000..98713b095a8a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setDataAttributeBindingId($dataAttributeBindingId) + ->setDataAttributeBinding($dataAttributeBinding); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->createDataAttributeBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataAttributeBinding $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $dataAttributeBindingId = '[DATA_ATTRIBUTE_BINDING_ID]'; + + create_data_attribute_binding_sample($formattedParent, $dataAttributeBindingId); +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php new file mode 100644 index 000000000000..5571016bc72b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setDataTaxonomyId($dataTaxonomyId) + ->setDataTaxonomy($dataTaxonomy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->createDataTaxonomy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataTaxonomy $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $dataTaxonomyId = '[DATA_TAXONOMY_ID]'; + + create_data_taxonomy_sample($formattedParent, $dataTaxonomyId); +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php new file mode 100644 index 000000000000..385684c2e2a8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->deleteDataAttribute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataTaxonomyServiceClient::dataAttributeName( + '[PROJECT]', + '[LOCATION]', + '[DATATAXONOMY]', + '[DATA_ATTRIBUTE_ID]' + ); + + delete_data_attribute_sample($formattedName); +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php new file mode 100644 index 000000000000..4b9d0ef5a5ee --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php @@ -0,0 +1,93 @@ +setName($formattedName) + ->setEtag($etag); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->deleteDataAttributeBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataTaxonomyServiceClient::dataAttributeBindingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_ATTRIBUTE_BINDING_ID]' + ); + $etag = '[ETAG]'; + + delete_data_attribute_binding_sample($formattedName, $etag); +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php new file mode 100644 index 000000000000..1c291330b917 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->deleteDataTaxonomy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataTaxonomyServiceClient::dataTaxonomyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_TAXONOMY_ID]' + ); + + delete_data_taxonomy_sample($formattedName); +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php new file mode 100644 index 000000000000..d9dfcec25749 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataAttribute $response */ + $response = $dataTaxonomyServiceClient->getDataAttribute($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 = DataTaxonomyServiceClient::dataAttributeName( + '[PROJECT]', + '[LOCATION]', + '[DATATAXONOMY]', + '[DATA_ATTRIBUTE_ID]' + ); + + get_data_attribute_sample($formattedName); +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php new file mode 100644 index 000000000000..14e6b9b5c31d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataAttributeBinding $response */ + $response = $dataTaxonomyServiceClient->getDataAttributeBinding($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 = DataTaxonomyServiceClient::dataAttributeBindingName( + '[PROJECT]', + '[LOCATION]', + '[DATA_ATTRIBUTE_BINDING_ID]' + ); + + get_data_attribute_binding_sample($formattedName); +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php new file mode 100644 index 000000000000..77a88b35ed74 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataTaxonomy $response */ + $response = $dataTaxonomyServiceClient->getDataTaxonomy($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 = DataTaxonomyServiceClient::dataTaxonomyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_TAXONOMY_ID]' + ); + + get_data_taxonomy_sample($formattedName); +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..cdfe6b3c224d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataTaxonomyServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_DataTaxonomyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php new file mode 100644 index 000000000000..10ef26833a95 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php new file mode 100644 index 000000000000..580015eea2a5 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTaxonomyServiceClient->listDataAttributeBindings($request); + + /** @var DataAttributeBinding $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_data_attribute_bindings_sample($formattedParent); +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php new file mode 100644 index 000000000000..45a3cf00c908 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTaxonomyServiceClient->listDataAttributes($request); + + /** @var DataAttribute $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 = DataTaxonomyServiceClient::dataTaxonomyName( + '[PROJECT]', + '[LOCATION]', + '[DATA_TAXONOMY_ID]' + ); + + list_data_attributes_sample($formattedParent); +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php new file mode 100644 index 000000000000..15d2c9816c6f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataTaxonomyServiceClient->listDataTaxonomies($request); + + /** @var DataTaxonomy $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_data_taxonomies_sample($formattedParent); +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php new file mode 100644 index 000000000000..6513d03c7a0b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $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()); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..824260ddc1a9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataTaxonomyServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_DataTaxonomyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..c0e4ecf04483 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $dataTaxonomyServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataplex_v1_generated_DataTaxonomyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php new file mode 100644 index 000000000000..285473890da3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setDataAttribute($dataAttribute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->updateDataAttribute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataAttribute $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()); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php new file mode 100644 index 000000000000..445933633ce2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setDataAttributeBinding($dataAttributeBinding); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->updateDataAttributeBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataAttributeBinding $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()); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php new file mode 100644 index 000000000000..26f7f3751d02 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setDataTaxonomy($dataTaxonomy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataTaxonomyServiceClient->updateDataTaxonomy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DataTaxonomy $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()); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php new file mode 100644 index 000000000000..0066b1261e4d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataplexServiceClient->cancelJob($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 = DataplexServiceClient::jobName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[TASK]', + '[JOB]' + ); + + cancel_job_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php new file mode 100644 index 000000000000..f057073fe270 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php @@ -0,0 +1,106 @@ +setType($assetResourceSpecType); + $asset = (new Asset()) + ->setResourceSpec($assetResourceSpec); + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAssetId($assetId) + ->setAsset($asset); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->createAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Asset $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $assetId = '[ASSET_ID]'; + $assetResourceSpecType = Type::TYPE_UNSPECIFIED; + + create_asset_sample($formattedParent, $assetId, $assetResourceSpecType); +} +// [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php new file mode 100644 index 000000000000..6b8d80141514 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php @@ -0,0 +1,110 @@ +setImageVersion($environmentInfrastructureSpecOsImageImageVersion); + $environmentInfrastructureSpec = (new InfrastructureSpec()) + ->setOsImage($environmentInfrastructureSpecOsImage); + $environment = (new Environment()) + ->setInfrastructureSpec($environmentInfrastructureSpec); + $request = (new CreateEnvironmentRequest()) + ->setParent($formattedParent) + ->setEnvironmentId($environmentId) + ->setEnvironment($environment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->createEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Environment $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $environmentId = '[ENVIRONMENT_ID]'; + $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]'; + + create_environment_sample( + $formattedParent, + $environmentId, + $environmentInfrastructureSpecOsImageImageVersion + ); +} +// [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php new file mode 100644 index 000000000000..73d0e04a03d4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php @@ -0,0 +1,97 @@ +setParent($formattedParent) + ->setLakeId($lakeId) + ->setLake($lake); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->createLake($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Lake $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 = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $lakeId = '[LAKE_ID]'; + + create_lake_sample($formattedParent, $lakeId); +} +// [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php new file mode 100644 index 000000000000..d38ea0c2a6f2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php @@ -0,0 +1,113 @@ +setType($taskTriggerSpecType); + $taskExecutionSpec = (new ExecutionSpec()) + ->setServiceAccount($taskExecutionSpecServiceAccount); + $task = (new Task()) + ->setTriggerSpec($taskTriggerSpec) + ->setExecutionSpec($taskExecutionSpec); + $request = (new CreateTaskRequest()) + ->setParent($formattedParent) + ->setTaskId($taskId) + ->setTask($task); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->createTask($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Task $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $taskId = '[TASK_ID]'; + $taskTriggerSpecType = Type::TYPE_UNSPECIFIED; + $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]'; + + create_task_sample( + $formattedParent, + $taskId, + $taskTriggerSpecType, + $taskExecutionSpecServiceAccount + ); +} +// [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php new file mode 100644 index 000000000000..392d9413e5b3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php @@ -0,0 +1,113 @@ +setLocationType($zoneResourceSpecLocationType); + $zone = (new Zone()) + ->setType($zoneType) + ->setResourceSpec($zoneResourceSpec); + $request = (new CreateZoneRequest()) + ->setParent($formattedParent) + ->setZoneId($zoneId) + ->setZone($zone); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->createZone($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Zone $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $zoneId = '[ZONE_ID]'; + $zoneType = Type::TYPE_UNSPECIFIED; + $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + + create_zone_sample($formattedParent, $zoneId, $zoneType, $zoneResourceSpecLocationType); +} +// [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php new file mode 100644 index 000000000000..798d1d0645fd --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->deleteAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataplexServiceClient::assetName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ASSET]' + ); + + delete_asset_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php new file mode 100644 index 000000000000..4587bd2482b2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->deleteEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataplexServiceClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ENVIRONMENT]' + ); + + delete_environment_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php new file mode 100644 index 000000000000..10b8301b577a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->deleteLake($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + + delete_lake_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php new file mode 100644 index 000000000000..1310dbd6d5a6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->deleteTask($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + + delete_task_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php new file mode 100644 index 000000000000..76e19d03180d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->deleteZone($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } 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 +{ + $formattedName = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + + delete_zone_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php new file mode 100644 index 000000000000..ff74e5d5edcb --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Asset $response */ + $response = $dataplexServiceClient->getAsset($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 = DataplexServiceClient::assetName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ASSET]' + ); + + get_asset_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php new file mode 100644 index 000000000000..3f1cc1f7fabd --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Environment $response */ + $response = $dataplexServiceClient->getEnvironment($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 = DataplexServiceClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ENVIRONMENT]' + ); + + get_environment_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..ca00c0967d38 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataplexServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_DataplexService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php new file mode 100644 index 000000000000..ae0010840b32 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $dataplexServiceClient->getJob($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 = DataplexServiceClient::jobName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[TASK]', + '[JOB]' + ); + + get_job_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php new file mode 100644 index 000000000000..bcde3b88f117 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Lake $response */ + $response = $dataplexServiceClient->getLake($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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + + get_lake_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php new file mode 100644 index 000000000000..129ba1447a2c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dataplex_v1_generated_DataplexService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php new file mode 100644 index 000000000000..300fb95f3e9c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $dataplexServiceClient->getTask($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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + + get_task_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php new file mode 100644 index 000000000000..83b5453bf71e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Zone $response */ + $response = $dataplexServiceClient->getZone($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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + + get_zone_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php new file mode 100644 index 000000000000..e48f14f7a532 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listAssetActions($request); + + /** @var Action $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 = DataplexServiceClient::assetName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ASSET]' + ); + + list_asset_actions_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php new file mode 100644 index 000000000000..b483f11e2fb6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listAssets($request); + + /** @var Asset $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + + list_assets_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php new file mode 100644 index 000000000000..85a3b128760d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listEnvironments($request); + + /** @var Environment $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + + list_environments_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php new file mode 100644 index 000000000000..7cffcf6c585d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listJobs($request); + + /** @var Job $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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + + list_jobs_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php new file mode 100644 index 000000000000..b72093e263f2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listLakeActions($request); + + /** @var Action $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + + list_lake_actions_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php new file mode 100644 index 000000000000..0771b5d36457 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listLakes($request); + + /** @var Lake $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 = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_lakes_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php new file mode 100644 index 000000000000..7fc1851579f8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $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()); + } +} +// [END dataplex_v1_generated_DataplexService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php new file mode 100644 index 000000000000..351ba996fd63 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listSessions($request); + + /** @var Session $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 = DataplexServiceClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ENVIRONMENT]' + ); + + list_sessions_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php new file mode 100644 index 000000000000..b6844fe5655e --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listTasks($request); + + /** @var Task $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + + list_tasks_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php new file mode 100644 index 000000000000..c477200a396c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listZoneActions($request); + + /** @var Action $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + + list_zone_actions_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php new file mode 100644 index 000000000000..677468431263 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataplexServiceClient->listZones($request); + + /** @var Zone $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + + list_zones_sample($formattedParent); +} +// [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php new file mode 100644 index 000000000000..e2820ce822d9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RunTaskResponse $response */ + $response = $dataplexServiceClient->runTask($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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + + run_task_sample($formattedName); +} +// [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..bc545bab9e0c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $dataplexServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_DataplexService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..1ab6ba3dbaea --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $dataplexServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataplex_v1_generated_DataplexService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php new file mode 100644 index 000000000000..c77d574602e1 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php @@ -0,0 +1,91 @@ +setType($assetResourceSpecType); + $asset = (new Asset()) + ->setResourceSpec($assetResourceSpec); + $request = (new UpdateAssetRequest()) + ->setUpdateMask($updateMask) + ->setAsset($asset); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->updateAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Asset $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 +{ + $assetResourceSpecType = Type::TYPE_UNSPECIFIED; + + update_asset_sample($assetResourceSpecType); +} +// [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php new file mode 100644 index 000000000000..bed9c28b72f6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php @@ -0,0 +1,93 @@ +setImageVersion($environmentInfrastructureSpecOsImageImageVersion); + $environmentInfrastructureSpec = (new InfrastructureSpec()) + ->setOsImage($environmentInfrastructureSpecOsImage); + $environment = (new Environment()) + ->setInfrastructureSpec($environmentInfrastructureSpec); + $request = (new UpdateEnvironmentRequest()) + ->setUpdateMask($updateMask) + ->setEnvironment($environment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->updateEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Environment $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 +{ + $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]'; + + update_environment_sample($environmentInfrastructureSpecOsImageImageVersion); +} +// [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php new file mode 100644 index 000000000000..dc022969b8a0 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setLake($lake); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->updateLake($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Lake $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()); + } +} +// [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php new file mode 100644 index 000000000000..93259225b932 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php @@ -0,0 +1,101 @@ +setType($taskTriggerSpecType); + $taskExecutionSpec = (new ExecutionSpec()) + ->setServiceAccount($taskExecutionSpecServiceAccount); + $task = (new Task()) + ->setTriggerSpec($taskTriggerSpec) + ->setExecutionSpec($taskExecutionSpec); + $request = (new UpdateTaskRequest()) + ->setUpdateMask($updateMask) + ->setTask($task); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->updateTask($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Task $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 +{ + $taskTriggerSpecType = Type::TYPE_UNSPECIFIED; + $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]'; + + update_task_sample($taskTriggerSpecType, $taskExecutionSpecServiceAccount); +} +// [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php new file mode 100644 index 000000000000..52fbcc9b5490 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php @@ -0,0 +1,96 @@ +setLocationType($zoneResourceSpecLocationType); + $zone = (new Zone()) + ->setType($zoneType) + ->setResourceSpec($zoneResourceSpec); + $request = (new UpdateZoneRequest()) + ->setUpdateMask($updateMask) + ->setZone($zone); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $dataplexServiceClient->updateZone($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Zone $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 +{ + $zoneType = Type::TYPE_UNSPECIFIED; + $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + + update_zone_sample($zoneType, $zoneResourceSpecLocationType); +} +// [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php new file mode 100644 index 000000000000..05c238731f50 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php @@ -0,0 +1,158 @@ + + * - image/{image subtype} + * - video/{video subtype} + * - audio/{audio subtype} + * @param bool $entitySchemaUserManaged Set to `true` if user-managed or `false` if managed by Dataplex. + * The default is `false` (managed by Dataplex). + * + * - Set to `false`to enable Dataplex discovery to update the schema. + * including new data discovery, schema inference, and schema evolution. + * Users retain the ability to input and edit the schema. Dataplex + * treats schema input by the user as though produced + * by a previous Dataplex discovery operation, and it will + * evolve the schema and take action based on that treatment. + * + * - Set to `true` to fully manage the entity + * schema. This setting guarantees that Dataplex will not + * change schema fields. + */ +function create_entity_sample( + string $formattedParent, + string $entityId, + int $entityType, + string $entityAsset, + string $entityDataPath, + int $entitySystem, + string $entityFormatMimeType, + bool $entitySchemaUserManaged +): void { + // Create a client. + $metadataServiceClient = new MetadataServiceClient(); + + // Prepare the request message. + $entityFormat = (new StorageFormat()) + ->setMimeType($entityFormatMimeType); + $entitySchema = (new Schema()) + ->setUserManaged($entitySchemaUserManaged); + $entity = (new Entity()) + ->setId($entityId) + ->setType($entityType) + ->setAsset($entityAsset) + ->setDataPath($entityDataPath) + ->setSystem($entitySystem) + ->setFormat($entityFormat) + ->setSchema($entitySchema); + $request = (new CreateEntityRequest()) + ->setParent($formattedParent) + ->setEntity($entity); + + // Call the API and handle any network failures. + try { + /** @var Entity $response */ + $response = $metadataServiceClient->createEntity($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 = MetadataServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $entityId = '[ID]'; + $entityType = Type::TYPE_UNSPECIFIED; + $entityAsset = '[ASSET]'; + $entityDataPath = '[DATA_PATH]'; + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entityFormatMimeType = '[MIME_TYPE]'; + $entitySchemaUserManaged = false; + + create_entity_sample( + $formattedParent, + $entityId, + $entityType, + $entityAsset, + $entityDataPath, + $entitySystem, + $entityFormatMimeType, + $entitySchemaUserManaged + ); +} +// [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php new file mode 100644 index 000000000000..026659fb503b --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php @@ -0,0 +1,93 @@ +/datasets//tables/` + */ +function create_partition_sample( + string $formattedParent, + string $partitionValuesElement, + string $partitionLocation +): void { + // Create a client. + $metadataServiceClient = new MetadataServiceClient(); + + // Prepare the request message. + $partitionValues = [$partitionValuesElement,]; + $partition = (new Partition()) + ->setValues($partitionValues) + ->setLocation($partitionLocation); + $request = (new CreatePartitionRequest()) + ->setParent($formattedParent) + ->setPartition($partition); + + // Call the API and handle any network failures. + try { + /** @var Partition $response */ + $response = $metadataServiceClient->createPartition($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 = MetadataServiceClient::entityName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ENTITY]' + ); + $partitionValuesElement = '[VALUES]'; + $partitionLocation = '[LOCATION]'; + + create_partition_sample($formattedParent, $partitionValuesElement, $partitionLocation); +} +// [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php new file mode 100644 index 000000000000..00e051a78951 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php @@ -0,0 +1,80 @@ +setName($formattedName) + ->setEtag($etag); + + // Call the API and handle any network failures. + try { + $metadataServiceClient->deleteEntity($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 = MetadataServiceClient::entityName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ENTITY]' + ); + $etag = '[ETAG]'; + + delete_entity_sample($formattedName, $etag); +} +// [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php new file mode 100644 index 000000000000..31e4f2eda9b4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $metadataServiceClient->deletePartition($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 = MetadataServiceClient::partitionName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ENTITY]', + '[PARTITION]' + ); + + delete_partition_sample($formattedName); +} +// [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php new file mode 100644 index 000000000000..ec79b20d7df2 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Entity $response */ + $response = $metadataServiceClient->getEntity($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 = MetadataServiceClient::entityName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ENTITY]' + ); + + get_entity_sample($formattedName); +} +// [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..8399224b6907 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $metadataServiceClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_MetadataService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php new file mode 100644 index 000000000000..5501bc69439f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END dataplex_v1_generated_MetadataService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php new file mode 100644 index 000000000000..ce12b9d3fca7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Partition $response */ + $response = $metadataServiceClient->getPartition($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 = MetadataServiceClient::partitionName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ENTITY]', + '[PARTITION]' + ); + + get_partition_sample($formattedName); +} +// [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php new file mode 100644 index 000000000000..99dd49524367 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setView($view); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $metadataServiceClient->listEntities($request); + + /** @var Entity $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 = MetadataServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $view = EntityView::ENTITY_VIEW_UNSPECIFIED; + + list_entities_sample($formattedParent, $view); +} +// [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php new file mode 100644 index 000000000000..f202cd99b0ba --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $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()); + } +} +// [END dataplex_v1_generated_MetadataService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php new file mode 100644 index 000000000000..9f9be687c200 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $metadataServiceClient->listPartitions($request); + + /** @var Partition $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 = MetadataServiceClient::entityName( + '[PROJECT]', + '[LOCATION]', + '[LAKE]', + '[ZONE]', + '[ENTITY]' + ); + + list_partitions_sample($formattedParent); +} +// [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..5b3901d62fdc --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $metadataServiceClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END dataplex_v1_generated_MetadataService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..ec38b927465d --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $metadataServiceClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataplex_v1_generated_MetadataService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php new file mode 100644 index 000000000000..b0def36590ed --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php @@ -0,0 +1,151 @@ + + * - image/{image subtype} + * - video/{video subtype} + * - audio/{audio subtype} + * @param bool $entitySchemaUserManaged Set to `true` if user-managed or `false` if managed by Dataplex. + * The default is `false` (managed by Dataplex). + * + * - Set to `false`to enable Dataplex discovery to update the schema. + * including new data discovery, schema inference, and schema evolution. + * Users retain the ability to input and edit the schema. Dataplex + * treats schema input by the user as though produced + * by a previous Dataplex discovery operation, and it will + * evolve the schema and take action based on that treatment. + * + * - Set to `true` to fully manage the entity + * schema. This setting guarantees that Dataplex will not + * change schema fields. + */ +function update_entity_sample( + string $entityId, + int $entityType, + string $entityAsset, + string $entityDataPath, + int $entitySystem, + string $entityFormatMimeType, + bool $entitySchemaUserManaged +): void { + // Create a client. + $metadataServiceClient = new MetadataServiceClient(); + + // Prepare the request message. + $entityFormat = (new StorageFormat()) + ->setMimeType($entityFormatMimeType); + $entitySchema = (new Schema()) + ->setUserManaged($entitySchemaUserManaged); + $entity = (new Entity()) + ->setId($entityId) + ->setType($entityType) + ->setAsset($entityAsset) + ->setDataPath($entityDataPath) + ->setSystem($entitySystem) + ->setFormat($entityFormat) + ->setSchema($entitySchema); + $request = (new UpdateEntityRequest()) + ->setEntity($entity); + + // Call the API and handle any network failures. + try { + /** @var Entity $response */ + $response = $metadataServiceClient->updateEntity($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 +{ + $entityId = '[ID]'; + $entityType = Type::TYPE_UNSPECIFIED; + $entityAsset = '[ASSET]'; + $entityDataPath = '[DATA_PATH]'; + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entityFormatMimeType = '[MIME_TYPE]'; + $entitySchemaUserManaged = false; + + update_entity_sample( + $entityId, + $entityType, + $entityAsset, + $entityDataPath, + $entitySystem, + $entityFormatMimeType, + $entitySchemaUserManaged + ); +} +// [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php new file mode 100644 index 000000000000..79febaef815a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php @@ -0,0 +1,531 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/content_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/content_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/content_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/content_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a content + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $content + * + * @return string The formatted content resource. + */ + public static function contentName(string $project, string $location, string $lake, string $content): string + { + return self::getPathTemplate('content')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'content' => $content, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a lake + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * + * @return string The formatted lake resource. + */ + public static function lakeName(string $project, string $location, string $lake): string + { + return self::getPathTemplate('lake')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - content: projects/{project}/locations/{location}/lakes/{lake}/content/{content} + * - lake: projects/{project}/locations/{location}/lakes/{lake} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create a content. + * + * The async variant is {@see ContentServiceClient::createContentAsync()} . + * + * @example samples/V1/ContentServiceClient/create_content.php + * + * @param CreateContentRequest $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 Content + * + * @throws ApiException Thrown if the API call fails. + */ + public function createContent(CreateContentRequest $request, array $callOptions = []): Content + { + return $this->startApiCall('CreateContent', $request, $callOptions)->wait(); + } + + /** + * Delete a content. + * + * The async variant is {@see ContentServiceClient::deleteContentAsync()} . + * + * @example samples/V1/ContentServiceClient/delete_content.php + * + * @param DeleteContentRequest $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 deleteContent(DeleteContentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteContent', $request, $callOptions)->wait(); + } + + /** + * Get a content resource. + * + * The async variant is {@see ContentServiceClient::getContentAsync()} . + * + * @example samples/V1/ContentServiceClient/get_content.php + * + * @param GetContentRequest $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 Content + * + * @throws ApiException Thrown if the API call fails. + */ + public function getContent(GetContentRequest $request, array $callOptions = []): Content + { + return $this->startApiCall('GetContent', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a contentitem resource. A `NOT_FOUND` + * error is returned if the resource does not exist. An empty policy is + * returned if the resource exists but does not have a policy set on it. + * + * Caller must have Google IAM `dataplex.content.getIamPolicy` permission + * on the resource. + * + * The async variant is {@see ContentServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/ContentServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * List content. + * + * The async variant is {@see ContentServiceClient::listContentAsync()} . + * + * @example samples/V1/ContentServiceClient/list_content.php + * + * @param ListContentRequest $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 listContent(ListContentRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListContent', $request, $callOptions); + } + + /** + * Sets the access control policy on the specified contentitem resource. + * Replaces any existing policy. + * + * Caller must have Google IAM `dataplex.content.setIamPolicy` permission + * on the resource. + * + * The async variant is {@see ContentServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/ContentServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns the caller's permissions on a resource. + * If the resource does not exist, an empty set of + * permissions is returned (a `NOT_FOUND` error is not returned). + * + * A caller is not required to have Google IAM permission to make this + * request. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * The async variant is {@see ContentServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/ContentServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Update a content. Only supports full resource update. + * + * The async variant is {@see ContentServiceClient::updateContentAsync()} . + * + * @example samples/V1/ContentServiceClient/update_content.php + * + * @param UpdateContentRequest $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 Content + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateContent(UpdateContentRequest $request, array $callOptions = []): Content + { + return $this->startApiCall('UpdateContent', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ContentServiceClient::getLocationAsync()} . + * + * @example samples/V1/ContentServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ContentServiceClient::listLocationsAsync()} . + * + * @example samples/V1/ContentServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php new file mode 100644 index 000000000000..bb4f769a7dd8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php @@ -0,0 +1,691 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_scan_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_scan_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_scan_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_scan_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_scan + * resource. + * + * @param string $project + * @param string $location + * @param string $dataScan + * + * @return string The formatted data_scan resource. + */ + public static function dataScanName(string $project, string $location, string $dataScan): string + { + return self::getPathTemplate('dataScan')->render([ + 'project' => $project, + 'location' => $location, + 'dataScan' => $dataScan, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_scan_job resource. + * + * @param string $project + * @param string $location + * @param string $dataScan + * @param string $job + * + * @return string The formatted data_scan_job resource. + */ + public static function dataScanJobName(string $project, string $location, string $dataScan, string $job): string + { + return self::getPathTemplate('dataScanJob')->render([ + 'project' => $project, + 'location' => $location, + 'dataScan' => $dataScan, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entity + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $entity + * + * @return string The formatted entity resource. + */ + public static function entityName(string $project, string $location, string $lake, string $zone, string $entity): string + { + return self::getPathTemplate('entity')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'entity' => $entity, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataScan: projects/{project}/locations/{location}/dataScans/{dataScan} + * - dataScanJob: projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job} + * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a DataScan resource. + * + * The async variant is {@see DataScanServiceClient::createDataScanAsync()} . + * + * @example samples/V1/DataScanServiceClient/create_data_scan.php + * + * @param CreateDataScanRequest $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 createDataScan(CreateDataScanRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDataScan', $request, $callOptions)->wait(); + } + + /** + * Deletes a DataScan resource. + * + * The async variant is {@see DataScanServiceClient::deleteDataScanAsync()} . + * + * @example samples/V1/DataScanServiceClient/delete_data_scan.php + * + * @param DeleteDataScanRequest $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 deleteDataScan(DeleteDataScanRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDataScan', $request, $callOptions)->wait(); + } + + /** + * Gets a DataScan resource. + * + * The async variant is {@see DataScanServiceClient::getDataScanAsync()} . + * + * @example samples/V1/DataScanServiceClient/get_data_scan.php + * + * @param GetDataScanRequest $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 DataScan + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataScan(GetDataScanRequest $request, array $callOptions = []): DataScan + { + return $this->startApiCall('GetDataScan', $request, $callOptions)->wait(); + } + + /** + * Gets a DataScanJob resource. + * + * The async variant is {@see DataScanServiceClient::getDataScanJobAsync()} . + * + * @example samples/V1/DataScanServiceClient/get_data_scan_job.php + * + * @param GetDataScanJobRequest $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 DataScanJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataScanJob(GetDataScanJobRequest $request, array $callOptions = []): DataScanJob + { + return $this->startApiCall('GetDataScanJob', $request, $callOptions)->wait(); + } + + /** + * Lists DataScanJobs under the given DataScan. + * + * The async variant is {@see DataScanServiceClient::listDataScanJobsAsync()} . + * + * @example samples/V1/DataScanServiceClient/list_data_scan_jobs.php + * + * @param ListDataScanJobsRequest $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 listDataScanJobs(ListDataScanJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataScanJobs', $request, $callOptions); + } + + /** + * Lists DataScans. + * + * The async variant is {@see DataScanServiceClient::listDataScansAsync()} . + * + * @example samples/V1/DataScanServiceClient/list_data_scans.php + * + * @param ListDataScansRequest $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 listDataScans(ListDataScansRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataScans', $request, $callOptions); + } + + /** + * Runs an on-demand execution of a DataScan + * + * The async variant is {@see DataScanServiceClient::runDataScanAsync()} . + * + * @example samples/V1/DataScanServiceClient/run_data_scan.php + * + * @param RunDataScanRequest $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 RunDataScanResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runDataScan(RunDataScanRequest $request, array $callOptions = []): RunDataScanResponse + { + return $this->startApiCall('RunDataScan', $request, $callOptions)->wait(); + } + + /** + * Updates a DataScan resource. + * + * The async variant is {@see DataScanServiceClient::updateDataScanAsync()} . + * + * @example samples/V1/DataScanServiceClient/update_data_scan.php + * + * @param UpdateDataScanRequest $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 updateDataScan(UpdateDataScanRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDataScan', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see DataScanServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/DataScanServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see DataScanServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/DataScanServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see DataScanServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/DataScanServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DataScanServiceClient::getLocationAsync()} . + * + * @example samples/V1/DataScanServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see DataScanServiceClient::listLocationsAsync()} . + * + * @example samples/V1/DataScanServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php new file mode 100644 index 000000000000..b33e44f5c5fe --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php @@ -0,0 +1,900 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_taxonomy_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_taxonomy_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_attribute resource. + * + * @param string $project + * @param string $location + * @param string $dataTaxonomy + * @param string $dataAttributeId + * + * @return string The formatted data_attribute resource. + */ + public static function dataAttributeName(string $project, string $location, string $dataTaxonomy, string $dataAttributeId): string + { + return self::getPathTemplate('dataAttribute')->render([ + 'project' => $project, + 'location' => $location, + 'dataTaxonomy' => $dataTaxonomy, + 'data_attribute_id' => $dataAttributeId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_attribute_binding resource. + * + * @param string $project + * @param string $location + * @param string $dataAttributeBindingId + * + * @return string The formatted data_attribute_binding resource. + */ + public static function dataAttributeBindingName(string $project, string $location, string $dataAttributeBindingId): string + { + return self::getPathTemplate('dataAttributeBinding')->render([ + 'project' => $project, + 'location' => $location, + 'data_attribute_binding_id' => $dataAttributeBindingId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_taxonomy resource. + * + * @param string $project + * @param string $location + * @param string $dataTaxonomyId + * + * @return string The formatted data_taxonomy resource. + */ + public static function dataTaxonomyName(string $project, string $location, string $dataTaxonomyId): string + { + return self::getPathTemplate('dataTaxonomy')->render([ + 'project' => $project, + 'location' => $location, + 'data_taxonomy_id' => $dataTaxonomyId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataAttribute: projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * - dataAttributeBinding: projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + * - dataTaxonomy: projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create a DataAttribute resource. + * + * The async variant is + * {@see DataTaxonomyServiceClient::createDataAttributeAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/create_data_attribute.php + * + * @param CreateDataAttributeRequest $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 createDataAttribute(CreateDataAttributeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDataAttribute', $request, $callOptions)->wait(); + } + + /** + * Create a DataAttributeBinding resource. + * + * The async variant is + * {@see DataTaxonomyServiceClient::createDataAttributeBindingAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php + * + * @param CreateDataAttributeBindingRequest $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 createDataAttributeBinding(CreateDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDataAttributeBinding', $request, $callOptions)->wait(); + } + + /** + * Create a DataTaxonomy resource. + * + * The async variant is {@see DataTaxonomyServiceClient::createDataTaxonomyAsync()} + * . + * + * @example samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php + * + * @param CreateDataTaxonomyRequest $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 createDataTaxonomy(CreateDataTaxonomyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDataTaxonomy', $request, $callOptions)->wait(); + } + + /** + * Deletes a Data Attribute resource. + * + * The async variant is + * {@see DataTaxonomyServiceClient::deleteDataAttributeAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php + * + * @param DeleteDataAttributeRequest $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 deleteDataAttribute(DeleteDataAttributeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDataAttribute', $request, $callOptions)->wait(); + } + + /** + * Deletes a DataAttributeBinding resource. All attributes within the + * DataAttributeBinding must be deleted before the DataAttributeBinding can be + * deleted. + * + * The async variant is + * {@see DataTaxonomyServiceClient::deleteDataAttributeBindingAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php + * + * @param DeleteDataAttributeBindingRequest $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 deleteDataAttributeBinding(DeleteDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDataAttributeBinding', $request, $callOptions)->wait(); + } + + /** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + * must be deleted before the DataTaxonomy can be deleted. + * + * The async variant is {@see DataTaxonomyServiceClient::deleteDataTaxonomyAsync()} + * . + * + * @example samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php + * + * @param DeleteDataTaxonomyRequest $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 deleteDataTaxonomy(DeleteDataTaxonomyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDataTaxonomy', $request, $callOptions)->wait(); + } + + /** + * Retrieves a Data Attribute resource. + * + * The async variant is {@see DataTaxonomyServiceClient::getDataAttributeAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/get_data_attribute.php + * + * @param GetDataAttributeRequest $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 DataAttribute + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataAttribute(GetDataAttributeRequest $request, array $callOptions = []): DataAttribute + { + return $this->startApiCall('GetDataAttribute', $request, $callOptions)->wait(); + } + + /** + * Retrieves a DataAttributeBinding resource. + * + * The async variant is + * {@see DataTaxonomyServiceClient::getDataAttributeBindingAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php + * + * @param GetDataAttributeBindingRequest $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 DataAttributeBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataAttributeBinding(GetDataAttributeBindingRequest $request, array $callOptions = []): DataAttributeBinding + { + return $this->startApiCall('GetDataAttributeBinding', $request, $callOptions)->wait(); + } + + /** + * Retrieves a DataTaxonomy resource. + * + * The async variant is {@see DataTaxonomyServiceClient::getDataTaxonomyAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php + * + * @param GetDataTaxonomyRequest $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 DataTaxonomy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataTaxonomy(GetDataTaxonomyRequest $request, array $callOptions = []): DataTaxonomy + { + return $this->startApiCall('GetDataTaxonomy', $request, $callOptions)->wait(); + } + + /** + * Lists DataAttributeBinding resources in a project and location. + * + * The async variant is + * {@see DataTaxonomyServiceClient::listDataAttributeBindingsAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php + * + * @param ListDataAttributeBindingsRequest $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 listDataAttributeBindings(ListDataAttributeBindingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataAttributeBindings', $request, $callOptions); + } + + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + * The async variant is {@see DataTaxonomyServiceClient::listDataAttributesAsync()} + * . + * + * @example samples/V1/DataTaxonomyServiceClient/list_data_attributes.php + * + * @param ListDataAttributesRequest $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 listDataAttributes(ListDataAttributesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataAttributes', $request, $callOptions); + } + + /** + * Lists DataTaxonomy resources in a project and location. + * + * The async variant is {@see DataTaxonomyServiceClient::listDataTaxonomiesAsync()} + * . + * + * @example samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php + * + * @param ListDataTaxonomiesRequest $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 listDataTaxonomies(ListDataTaxonomiesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataTaxonomies', $request, $callOptions); + } + + /** + * Updates a DataAttribute resource. + * + * The async variant is + * {@see DataTaxonomyServiceClient::updateDataAttributeAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/update_data_attribute.php + * + * @param UpdateDataAttributeRequest $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 updateDataAttribute(UpdateDataAttributeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDataAttribute', $request, $callOptions)->wait(); + } + + /** + * Updates a DataAttributeBinding resource. + * + * The async variant is + * {@see DataTaxonomyServiceClient::updateDataAttributeBindingAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php + * + * @param UpdateDataAttributeBindingRequest $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 updateDataAttributeBinding(UpdateDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDataAttributeBinding', $request, $callOptions)->wait(); + } + + /** + * Updates a DataTaxonomy resource. + * + * The async variant is {@see DataTaxonomyServiceClient::updateDataTaxonomyAsync()} + * . + * + * @example samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php + * + * @param UpdateDataTaxonomyRequest $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 updateDataTaxonomy(UpdateDataTaxonomyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDataTaxonomy', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see DataTaxonomyServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see DataTaxonomyServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see DataTaxonomyServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DataTaxonomyServiceClient::getLocationAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see DataTaxonomyServiceClient::listLocationsAsync()} . + * + * @example samples/V1/DataTaxonomyServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php new file mode 100644 index 000000000000..6ec4d7337b9c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php @@ -0,0 +1,1467 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/dataplex_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/dataplex_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/dataplex_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/dataplex_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a asset + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $asset + * + * @return string The formatted asset resource. + */ + public static function assetName(string $project, string $location, string $lake, string $zone, string $asset): string + { + return self::getPathTemplate('asset')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $location, string $lake, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $task + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName(string $project, string $location, string $lake, string $task, string $job): string + { + return self::getPathTemplate('job')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'task' => $task, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a lake + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * + * @return string The formatted lake resource. + */ + public static function lakeName(string $project, string $location, string $lake): string + { + return self::getPathTemplate('lake')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName(string $project, string $location, string $lake, string $task): string + { + return self::getPathTemplate('task')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'task' => $task, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a zone + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * + * @return string The formatted zone resource. + */ + public static function zoneName(string $project, string $location, string $lake, string $zone): string + { + return self::getPathTemplate('zone')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - asset: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset} + * - environment: projects/{project}/locations/{location}/lakes/{lake}/environments/{environment} + * - job: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job} + * - lake: projects/{project}/locations/{location}/lakes/{lake} + * - location: projects/{project}/locations/{location} + * - task: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task} + * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Cancel jobs running for the task resource. + * + * The async variant is {@see DataplexServiceClient::cancelJobAsync()} . + * + * @example samples/V1/DataplexServiceClient/cancel_job.php + * + * @param CancelJobRequest $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 cancelJob(CancelJobRequest $request, array $callOptions = []): void + { + $this->startApiCall('CancelJob', $request, $callOptions)->wait(); + } + + /** + * Creates an asset resource. + * + * The async variant is {@see DataplexServiceClient::createAssetAsync()} . + * + * @example samples/V1/DataplexServiceClient/create_asset.php + * + * @param CreateAssetRequest $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 createAsset(CreateAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAsset', $request, $callOptions)->wait(); + } + + /** + * Create an environment resource. + * + * The async variant is {@see DataplexServiceClient::createEnvironmentAsync()} . + * + * @example samples/V1/DataplexServiceClient/create_environment.php + * + * @param CreateEnvironmentRequest $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 createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); + } + + /** + * Creates a lake resource. + * + * The async variant is {@see DataplexServiceClient::createLakeAsync()} . + * + * @example samples/V1/DataplexServiceClient/create_lake.php + * + * @param CreateLakeRequest $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 createLake(CreateLakeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateLake', $request, $callOptions)->wait(); + } + + /** + * Creates a task resource within a lake. + * + * The async variant is {@see DataplexServiceClient::createTaskAsync()} . + * + * @example samples/V1/DataplexServiceClient/create_task.php + * + * @param CreateTaskRequest $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 createTask(CreateTaskRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTask', $request, $callOptions)->wait(); + } + + /** + * Creates a zone resource within a lake. + * + * The async variant is {@see DataplexServiceClient::createZoneAsync()} . + * + * @example samples/V1/DataplexServiceClient/create_zone.php + * + * @param CreateZoneRequest $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 createZone(CreateZoneRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateZone', $request, $callOptions)->wait(); + } + + /** + * Deletes an asset resource. The referenced storage resource is detached + * (default) or deleted based on the associated Lifecycle policy. + * + * The async variant is {@see DataplexServiceClient::deleteAssetAsync()} . + * + * @example samples/V1/DataplexServiceClient/delete_asset.php + * + * @param DeleteAssetRequest $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 deleteAsset(DeleteAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAsset', $request, $callOptions)->wait(); + } + + /** + * Delete the environment resource. All the child resources must have been + * deleted before environment deletion can be initiated. + * + * The async variant is {@see DataplexServiceClient::deleteEnvironmentAsync()} . + * + * @example samples/V1/DataplexServiceClient/delete_environment.php + * + * @param DeleteEnvironmentRequest $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 deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); + } + + /** + * Deletes a lake resource. All zones within the lake must be deleted before + * the lake can be deleted. + * + * The async variant is {@see DataplexServiceClient::deleteLakeAsync()} . + * + * @example samples/V1/DataplexServiceClient/delete_lake.php + * + * @param DeleteLakeRequest $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 deleteLake(DeleteLakeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteLake', $request, $callOptions)->wait(); + } + + /** + * Delete the task resource. + * + * The async variant is {@see DataplexServiceClient::deleteTaskAsync()} . + * + * @example samples/V1/DataplexServiceClient/delete_task.php + * + * @param DeleteTaskRequest $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 deleteTask(DeleteTaskRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteTask', $request, $callOptions)->wait(); + } + + /** + * Deletes a zone resource. All assets within a zone must be deleted before + * the zone can be deleted. + * + * The async variant is {@see DataplexServiceClient::deleteZoneAsync()} . + * + * @example samples/V1/DataplexServiceClient/delete_zone.php + * + * @param DeleteZoneRequest $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 deleteZone(DeleteZoneRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteZone', $request, $callOptions)->wait(); + } + + /** + * Retrieves an asset resource. + * + * The async variant is {@see DataplexServiceClient::getAssetAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_asset.php + * + * @param GetAssetRequest $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 Asset + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAsset(GetAssetRequest $request, array $callOptions = []): Asset + { + return $this->startApiCall('GetAsset', $request, $callOptions)->wait(); + } + + /** + * Get environment resource. + * + * The async variant is {@see DataplexServiceClient::getEnvironmentAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_environment.php + * + * @param GetEnvironmentRequest $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 Environment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment + { + return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); + } + + /** + * Get job resource. + * + * The async variant is {@see DataplexServiceClient::getJobAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_job.php + * + * @param GetJobRequest $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 Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function getJob(GetJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('GetJob', $request, $callOptions)->wait(); + } + + /** + * Retrieves a lake resource. + * + * The async variant is {@see DataplexServiceClient::getLakeAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_lake.php + * + * @param GetLakeRequest $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 Lake + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLake(GetLakeRequest $request, array $callOptions = []): Lake + { + return $this->startApiCall('GetLake', $request, $callOptions)->wait(); + } + + /** + * Get task resource. + * + * The async variant is {@see DataplexServiceClient::getTaskAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_task.php + * + * @param GetTaskRequest $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 Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTask(GetTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('GetTask', $request, $callOptions)->wait(); + } + + /** + * Retrieves a zone resource. + * + * The async variant is {@see DataplexServiceClient::getZoneAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_zone.php + * + * @param GetZoneRequest $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 Zone + * + * @throws ApiException Thrown if the API call fails. + */ + public function getZone(GetZoneRequest $request, array $callOptions = []): Zone + { + return $this->startApiCall('GetZone', $request, $callOptions)->wait(); + } + + /** + * Lists action resources in an asset. + * + * The async variant is {@see DataplexServiceClient::listAssetActionsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_asset_actions.php + * + * @param ListAssetActionsRequest $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 listAssetActions(ListAssetActionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAssetActions', $request, $callOptions); + } + + /** + * Lists asset resources in a zone. + * + * The async variant is {@see DataplexServiceClient::listAssetsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_assets.php + * + * @param ListAssetsRequest $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 listAssets(ListAssetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAssets', $request, $callOptions); + } + + /** + * Lists environments under the given lake. + * + * The async variant is {@see DataplexServiceClient::listEnvironmentsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_environments.php + * + * @param ListEnvironmentsRequest $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 listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEnvironments', $request, $callOptions); + } + + /** + * Lists Jobs under the given task. + * + * The async variant is {@see DataplexServiceClient::listJobsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_jobs.php + * + * @param ListJobsRequest $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 listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListJobs', $request, $callOptions); + } + + /** + * Lists action resources in a lake. + * + * The async variant is {@see DataplexServiceClient::listLakeActionsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_lake_actions.php + * + * @param ListLakeActionsRequest $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 listLakeActions(ListLakeActionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLakeActions', $request, $callOptions); + } + + /** + * Lists lake resources in a project and location. + * + * The async variant is {@see DataplexServiceClient::listLakesAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_lakes.php + * + * @param ListLakesRequest $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 listLakes(ListLakesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLakes', $request, $callOptions); + } + + /** + * Lists session resources in an environment. + * + * The async variant is {@see DataplexServiceClient::listSessionsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_sessions.php + * + * @param ListSessionsRequest $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 listSessions(ListSessionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSessions', $request, $callOptions); + } + + /** + * Lists tasks under the given lake. + * + * The async variant is {@see DataplexServiceClient::listTasksAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_tasks.php + * + * @param ListTasksRequest $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 listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTasks', $request, $callOptions); + } + + /** + * Lists action resources in a zone. + * + * The async variant is {@see DataplexServiceClient::listZoneActionsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_zone_actions.php + * + * @param ListZoneActionsRequest $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 listZoneActions(ListZoneActionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListZoneActions', $request, $callOptions); + } + + /** + * Lists zone resources in a lake. + * + * The async variant is {@see DataplexServiceClient::listZonesAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_zones.php + * + * @param ListZonesRequest $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 listZones(ListZonesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListZones', $request, $callOptions); + } + + /** + * Run an on demand execution of a Task. + * + * The async variant is {@see DataplexServiceClient::runTaskAsync()} . + * + * @example samples/V1/DataplexServiceClient/run_task.php + * + * @param RunTaskRequest $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 RunTaskResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runTask(RunTaskRequest $request, array $callOptions = []): RunTaskResponse + { + return $this->startApiCall('RunTask', $request, $callOptions)->wait(); + } + + /** + * Updates an asset resource. + * + * The async variant is {@see DataplexServiceClient::updateAssetAsync()} . + * + * @example samples/V1/DataplexServiceClient/update_asset.php + * + * @param UpdateAssetRequest $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 updateAsset(UpdateAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAsset', $request, $callOptions)->wait(); + } + + /** + * Update the environment resource. + * + * The async variant is {@see DataplexServiceClient::updateEnvironmentAsync()} . + * + * @example samples/V1/DataplexServiceClient/update_environment.php + * + * @param UpdateEnvironmentRequest $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 updateEnvironment(UpdateEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateEnvironment', $request, $callOptions)->wait(); + } + + /** + * Updates a lake resource. + * + * The async variant is {@see DataplexServiceClient::updateLakeAsync()} . + * + * @example samples/V1/DataplexServiceClient/update_lake.php + * + * @param UpdateLakeRequest $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 updateLake(UpdateLakeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateLake', $request, $callOptions)->wait(); + } + + /** + * Update the task resource. + * + * The async variant is {@see DataplexServiceClient::updateTaskAsync()} . + * + * @example samples/V1/DataplexServiceClient/update_task.php + * + * @param UpdateTaskRequest $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 updateTask(UpdateTaskRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTask', $request, $callOptions)->wait(); + } + + /** + * Updates a zone resource. + * + * The async variant is {@see DataplexServiceClient::updateZoneAsync()} . + * + * @example samples/V1/DataplexServiceClient/update_zone.php + * + * @param UpdateZoneRequest $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 updateZone(UpdateZoneRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateZone', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see DataplexServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see DataplexServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/DataplexServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see DataplexServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/DataplexServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DataplexServiceClient::getLocationAsync()} . + * + * @example samples/V1/DataplexServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see DataplexServiceClient::listLocationsAsync()} . + * + * @example samples/V1/DataplexServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php new file mode 100644 index 000000000000..f3c0d5cf22fa --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php @@ -0,0 +1,666 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/metadata_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/metadata_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/metadata_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/metadata_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a entity + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $entity + * + * @return string The formatted entity resource. + */ + public static function entityName(string $project, string $location, string $lake, string $zone, string $entity): string + { + return self::getPathTemplate('entity')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'entity' => $entity, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a partition + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $entity + * @param string $partition + * + * @return string The formatted partition resource. + */ + public static function partitionName(string $project, string $location, string $lake, string $zone, string $entity, string $partition): string + { + return self::getPathTemplate('partition')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'entity' => $entity, + 'partition' => $partition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a zone + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * + * @return string The formatted zone resource. + */ + public static function zoneName(string $project, string $location, string $lake, string $zone): string + { + return self::getPathTemplate('zone')->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} + * - partition: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition} + * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create a metadata entity. + * + * The async variant is {@see MetadataServiceClient::createEntityAsync()} . + * + * @example samples/V1/MetadataServiceClient/create_entity.php + * + * @param CreateEntityRequest $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 Entity + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEntity(CreateEntityRequest $request, array $callOptions = []): Entity + { + return $this->startApiCall('CreateEntity', $request, $callOptions)->wait(); + } + + /** + * Create a metadata partition. + * + * The async variant is {@see MetadataServiceClient::createPartitionAsync()} . + * + * @example samples/V1/MetadataServiceClient/create_partition.php + * + * @param CreatePartitionRequest $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 Partition + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPartition(CreatePartitionRequest $request, array $callOptions = []): Partition + { + return $this->startApiCall('CreatePartition', $request, $callOptions)->wait(); + } + + /** + * Delete a metadata entity. + * + * The async variant is {@see MetadataServiceClient::deleteEntityAsync()} . + * + * @example samples/V1/MetadataServiceClient/delete_entity.php + * + * @param DeleteEntityRequest $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 deleteEntity(DeleteEntityRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEntity', $request, $callOptions)->wait(); + } + + /** + * Delete a metadata partition. + * + * The async variant is {@see MetadataServiceClient::deletePartitionAsync()} . + * + * @example samples/V1/MetadataServiceClient/delete_partition.php + * + * @param DeletePartitionRequest $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 deletePartition(DeletePartitionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePartition', $request, $callOptions)->wait(); + } + + /** + * Get a metadata entity. + * + * The async variant is {@see MetadataServiceClient::getEntityAsync()} . + * + * @example samples/V1/MetadataServiceClient/get_entity.php + * + * @param GetEntityRequest $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 Entity + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEntity(GetEntityRequest $request, array $callOptions = []): Entity + { + return $this->startApiCall('GetEntity', $request, $callOptions)->wait(); + } + + /** + * Get a metadata partition of an entity. + * + * The async variant is {@see MetadataServiceClient::getPartitionAsync()} . + * + * @example samples/V1/MetadataServiceClient/get_partition.php + * + * @param GetPartitionRequest $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 Partition + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPartition(GetPartitionRequest $request, array $callOptions = []): Partition + { + return $this->startApiCall('GetPartition', $request, $callOptions)->wait(); + } + + /** + * List metadata entities in a zone. + * + * The async variant is {@see MetadataServiceClient::listEntitiesAsync()} . + * + * @example samples/V1/MetadataServiceClient/list_entities.php + * + * @param ListEntitiesRequest $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 listEntities(ListEntitiesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEntities', $request, $callOptions); + } + + /** + * List metadata partitions of an entity. + * + * The async variant is {@see MetadataServiceClient::listPartitionsAsync()} . + * + * @example samples/V1/MetadataServiceClient/list_partitions.php + * + * @param ListPartitionsRequest $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 listPartitions(ListPartitionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPartitions', $request, $callOptions); + } + + /** + * Update a metadata entity. Only supports full resource update. + * + * The async variant is {@see MetadataServiceClient::updateEntityAsync()} . + * + * @example samples/V1/MetadataServiceClient/update_entity.php + * + * @param UpdateEntityRequest $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 Entity + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEntity(UpdateEntityRequest $request, array $callOptions = []): Entity + { + return $this->startApiCall('UpdateEntity', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see MetadataServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/MetadataServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see MetadataServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/MetadataServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see MetadataServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/MetadataServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see MetadataServiceClient::getLocationAsync()} . + * + * @example samples/V1/MetadataServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see MetadataServiceClient::listLocationsAsync()} . + * + * @example samples/V1/MetadataServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php new file mode 100644 index 000000000000..944c7d472a65 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php @@ -0,0 +1,34 @@ +lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * $content = new Content(); + * $response = $contentServiceClient->createContent($formattedParent, $content); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\Dataplex\V1\Client\ContentServiceClient} to use the new surface. + */ +class ContentServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dataplex.v1.ContentService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dataplex.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $contentNameTemplate; + + private static $lakeNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/content_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/content_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/content_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/content_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getContentNameTemplate() + { + if (self::$contentNameTemplate == null) { + self::$contentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/content/{content}'); + } + + return self::$contentNameTemplate; + } + + private static function getLakeNameTemplate() + { + if (self::$lakeNameTemplate == null) { + self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}'); + } + + return self::$lakeNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'content' => self::getContentNameTemplate(), + 'lake' => self::getLakeNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a content + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $content + * + * @return string The formatted content resource. + */ + public static function contentName($project, $location, $lake, $content) + { + return self::getContentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'content' => $content, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a lake + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * + * @return string The formatted lake resource. + */ + public static function lakeName($project, $location, $lake) + { + return self::getLakeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - content: projects/{project}/locations/{location}/lakes/{lake}/content/{content} + * - lake: projects/{project}/locations/{location}/lakes/{lake} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Create a content. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $formattedParent = $contentServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * $content = new Content(); + * $response = $contentServiceClient->createContent($formattedParent, $content); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param Content $content Required. Content resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Content + * + * @throws ApiException if the remote call fails + */ + public function createContent($parent, $content, array $optionalArgs = []) + { + $request = new CreateContentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setContent($content); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateContent', Content::class, $optionalArgs, $request)->wait(); + } + + /** + * Delete a content. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $formattedName = $contentServiceClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + * $contentServiceClient->deleteContent($formattedName); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteContent($name, array $optionalArgs = []) + { + $request = new DeleteContentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteContent', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a content resource. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $formattedName = $contentServiceClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + * $response = $contentServiceClient->getContent($formattedName); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. Specify content view to make a partial request. + * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetContentRequest\ContentView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Content + * + * @throws ApiException if the remote call fails + */ + public function getContent($name, array $optionalArgs = []) + { + $request = new GetContentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetContent', Content::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a contentitem resource. A `NOT_FOUND` + * error is returned if the resource does not exist. An empty policy is + * returned if the resource exists but does not have a policy set on it. + * + * Caller must have Google IAM `dataplex.content.getIamPolicy` permission + * on the resource. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $resource = 'resource'; + * $response = $contentServiceClient->getIamPolicy($resource); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * List content. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $formattedParent = $contentServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * // Iterate over pages of elements + * $pagedResponse = $contentServiceClient->listContent($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contentServiceClient->listContent($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listContent($parent, array $optionalArgs = []) + { + $request = new ListContentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListContent', $optionalArgs, ListContentResponse::class, $request); + } + + /** + * Sets the access control policy on the specified contentitem resource. + * Replaces any existing policy. + * + * Caller must have Google IAM `dataplex.content.setIamPolicy` permission + * on the resource. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $contentServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the caller's permissions on a resource. + * If the resource does not exist, an empty set of + * permissions is returned (a `NOT_FOUND` error is not returned). + * + * A caller is not required to have Google IAM permission to make this + * request. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $contentServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Update a content. Only supports full resource update. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $content = new Content(); + * $response = $contentServiceClient->updateContent($updateMask, $content); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param Content $content Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Content + * + * @throws ApiException if the remote call fails + */ + public function updateContent($updateMask, $content, array $optionalArgs = []) + { + $request = new UpdateContentRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setContent($content); + $requestParamHeaders['content.name'] = $content->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateContent', Content::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * $response = $contentServiceClient->getLocation(); + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $contentServiceClient = new ContentServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $contentServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $contentServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $contentServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php new file mode 100644 index 000000000000..fb97c9751cad --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php @@ -0,0 +1,1258 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $dataScan = new DataScan(); + * $dataScanId = 'data_scan_id'; + * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'createDataScan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\Dataplex\V1\Client\DataScanServiceClient} to use the new surface. + */ +class DataScanServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dataplex.v1.DataScanService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dataplex.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $dataScanNameTemplate; + + private static $dataScanJobNameTemplate; + + private static $entityNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_scan_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_scan_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_scan_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_scan_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getDataScanNameTemplate() + { + if (self::$dataScanNameTemplate == null) { + self::$dataScanNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataScans/{dataScan}'); + } + + return self::$dataScanNameTemplate; + } + + private static function getDataScanJobNameTemplate() + { + if (self::$dataScanJobNameTemplate == null) { + self::$dataScanJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}'); + } + + return self::$dataScanJobNameTemplate; + } + + private static function getEntityNameTemplate() + { + if (self::$entityNameTemplate == null) { + self::$entityNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}'); + } + + return self::$entityNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'dataScan' => self::getDataScanNameTemplate(), + 'dataScanJob' => self::getDataScanJobNameTemplate(), + 'entity' => self::getEntityNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a data_scan + * resource. + * + * @param string $project + * @param string $location + * @param string $dataScan + * + * @return string The formatted data_scan resource. + */ + public static function dataScanName($project, $location, $dataScan) + { + return self::getDataScanNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'dataScan' => $dataScan, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_scan_job resource. + * + * @param string $project + * @param string $location + * @param string $dataScan + * @param string $job + * + * @return string The formatted data_scan_job resource. + */ + public static function dataScanJobName($project, $location, $dataScan, $job) + { + return self::getDataScanJobNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'dataScan' => $dataScan, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a entity + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $entity + * + * @return string The formatted entity resource. + */ + public static function entityName($project, $location, $lake, $zone, $entity) + { + return self::getEntityNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'entity' => $entity, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataScan: projects/{project}/locations/{location}/dataScans/{dataScan} + * - dataScanJob: projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job} + * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a DataScan resource. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $formattedParent = $dataScanServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $dataScan = new DataScan(); + * $dataScanId = 'data_scan_id'; + * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'createDataScan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param DataScan $dataScan Required. DataScan resource. + * @param string $dataScanId Required. DataScan identifier. + * + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createDataScan($parent, $dataScan, $dataScanId, array $optionalArgs = []) + { + $request = new CreateDataScanRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataScan($dataScan); + $request->setDataScanId($dataScanId); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a DataScan resource. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + * $operationResponse = $dataScanServiceClient->deleteDataScan($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataScanServiceClient->deleteDataScan($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'deleteDataScan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteDataScan($name, array $optionalArgs = []) + { + $request = new DeleteDataScanRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets a DataScan resource. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + * $response = $dataScanServiceClient->getDataScan($formattedName); + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. Select the DataScan view to return. Defaults to `BASIC`. + * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetDataScanRequest\DataScanView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\DataScan + * + * @throws ApiException if the remote call fails + */ + public function getDataScan($name, array $optionalArgs = []) + { + $request = new GetDataScanRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDataScan', DataScan::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a DataScanJob resource. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $formattedName = $dataScanServiceClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); + * $response = $dataScanServiceClient->getDataScanJob($formattedName); + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetDataScanJobRequest\DataScanJobView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\DataScanJob + * + * @throws ApiException if the remote call fails + */ + public function getDataScanJob($name, array $optionalArgs = []) + { + $request = new GetDataScanJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDataScanJob', DataScanJob::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists DataScanJobs under the given DataScan. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $formattedParent = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + * // Iterate over pages of elements + * $pagedResponse = $dataScanServiceClient->listDataScanJobs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataScanServiceClient->listDataScanJobs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * + * Allowed fields are: + * + * - `start_time` + * - `end_time` + * + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDataScanJobs($parent, array $optionalArgs = []) + { + $request = new ListDataScanJobsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDataScanJobs', $optionalArgs, ListDataScanJobsResponse::class, $request); + } + + /** + * Lists DataScans. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $formattedParent = $dataScanServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $dataScanServiceClient->listDataScans($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataScanServiceClient->listDataScans($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDataScans($parent, array $optionalArgs = []) + { + $request = new ListDataScansRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDataScans', $optionalArgs, ListDataScansResponse::class, $request); + } + + /** + * Runs an on-demand execution of a DataScan + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + * $response = $dataScanServiceClient->runDataScan($formattedName); + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Only **OnDemand** data scans are allowed. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\RunDataScanResponse + * + * @throws ApiException if the remote call fails + */ + public function runDataScan($name, array $optionalArgs = []) + { + $request = new RunDataScanRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunDataScan', RunDataScanResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a DataScan resource. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $dataScan = new DataScan(); + * $updateMask = new FieldMask(); + * $operationResponse = $dataScanServiceClient->updateDataScan($dataScan, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataScanServiceClient->updateDataScan($dataScan, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'updateDataScan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param DataScan $dataScan Required. DataScan resource to be updated. + * + * Only fields specified in `update_mask` are updated. + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateDataScan($dataScan, $updateMask, array $optionalArgs = []) + { + $request = new UpdateDataScanRequest(); + $requestParamHeaders = []; + $request->setDataScan($dataScan); + $request->setUpdateMask($updateMask); + $requestParamHeaders['data_scan.name'] = $dataScan->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $resource = 'resource'; + * $response = $dataScanServiceClient->getIamPolicy($resource); + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $dataScanServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $dataScanServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * $response = $dataScanServiceClient->getLocation(); + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $dataScanServiceClient = new DataScanServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $dataScanServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataScanServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataScanServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php new file mode 100644 index 000000000000..c7a718ca8964 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php @@ -0,0 +1,1768 @@ +dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + * $dataAttributeId = 'data_attribute_id'; + * $dataAttribute = new DataAttribute(); + * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttribute'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\Dataplex\V1\Client\DataTaxonomyServiceClient} to use the new + * surface. + */ +class DataTaxonomyServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dataplex.v1.DataTaxonomyService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dataplex.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $dataAttributeNameTemplate; + + private static $dataAttributeBindingNameTemplate; + + private static $dataTaxonomyNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/data_taxonomy_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getDataAttributeNameTemplate() + { + if (self::$dataAttributeNameTemplate == null) { + self::$dataAttributeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}'); + } + + return self::$dataAttributeNameTemplate; + } + + private static function getDataAttributeBindingNameTemplate() + { + if (self::$dataAttributeBindingNameTemplate == null) { + self::$dataAttributeBindingNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}'); + } + + return self::$dataAttributeBindingNameTemplate; + } + + private static function getDataTaxonomyNameTemplate() + { + if (self::$dataTaxonomyNameTemplate == null) { + self::$dataTaxonomyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}'); + } + + return self::$dataTaxonomyNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'dataAttribute' => self::getDataAttributeNameTemplate(), + 'dataAttributeBinding' => self::getDataAttributeBindingNameTemplate(), + 'dataTaxonomy' => self::getDataTaxonomyNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_attribute resource. + * + * @param string $project + * @param string $location + * @param string $dataTaxonomy + * @param string $dataAttributeId + * + * @return string The formatted data_attribute resource. + */ + public static function dataAttributeName($project, $location, $dataTaxonomy, $dataAttributeId) + { + return self::getDataAttributeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'dataTaxonomy' => $dataTaxonomy, + 'data_attribute_id' => $dataAttributeId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_attribute_binding resource. + * + * @param string $project + * @param string $location + * @param string $dataAttributeBindingId + * + * @return string The formatted data_attribute_binding resource. + */ + public static function dataAttributeBindingName($project, $location, $dataAttributeBindingId) + { + return self::getDataAttributeBindingNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'data_attribute_binding_id' => $dataAttributeBindingId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * data_taxonomy resource. + * + * @param string $project + * @param string $location + * @param string $dataTaxonomyId + * + * @return string The formatted data_taxonomy resource. + */ + public static function dataTaxonomyName($project, $location, $dataTaxonomyId) + { + return self::getDataTaxonomyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'data_taxonomy_id' => $dataTaxonomyId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dataAttribute: projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * - dataAttributeBinding: projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + * - dataTaxonomy: projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Create a DataAttribute resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedParent = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + * $dataAttributeId = 'data_attribute_id'; + * $dataAttribute = new DataAttribute(); + * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttribute'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param string $dataAttributeId Required. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + * @param DataAttribute $dataAttribute Required. DataAttribute resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createDataAttribute($parent, $dataAttributeId, $dataAttribute, array $optionalArgs = []) + { + $request = new CreateDataAttributeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataAttributeId($dataAttributeId); + $request->setDataAttribute($dataAttribute); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Create a DataAttributeBinding resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $dataAttributeBindingId = 'data_attribute_binding_id'; + * $dataAttributeBinding = new DataAttributeBinding(); + * $operationResponse = $dataTaxonomyServiceClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttributeBinding'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * @param string $dataAttributeBindingId Required. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + * @param DataAttributeBinding $dataAttributeBinding Required. DataAttributeBinding resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createDataAttributeBinding($parent, $dataAttributeBindingId, $dataAttributeBinding, array $optionalArgs = []) + { + $request = new CreateDataAttributeBindingRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataAttributeBindingId($dataAttributeBindingId); + $request->setDataAttributeBinding($dataAttributeBinding); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Create a DataTaxonomy resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $dataTaxonomyId = 'data_taxonomy_id'; + * $dataTaxonomy = new DataTaxonomy(); + * $operationResponse = $dataTaxonomyServiceClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataTaxonomy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param string $dataTaxonomyId Required. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + * @param DataTaxonomy $dataTaxonomy Required. DataTaxonomy resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createDataTaxonomy($parent, $dataTaxonomyId, $dataTaxonomy, array $optionalArgs = []) + { + $request = new CreateDataTaxonomyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataTaxonomyId($dataTaxonomyId); + $request->setDataTaxonomy($dataTaxonomy); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a Data Attribute resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedName = $dataTaxonomyServiceClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttribute($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttribute($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataAttribute'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteDataAttribute method returns an ABORTED error response. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteDataAttribute($name, array $optionalArgs = []) + { + $request = new DeleteDataAttributeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a DataAttributeBinding resource. All attributes within the + * DataAttributeBinding must be deleted before the DataAttributeBinding can be + * deleted. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedName = $dataTaxonomyServiceClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + * $etag = 'etag'; + * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttributeBinding($formattedName, $etag); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttributeBinding($formattedName, $etag); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataAttributeBinding'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @param string $etag Required. If the client provided etag value does not match the current etag + * value, the DeleteDataAttributeBindingRequest method returns an ABORTED + * error response. Etags must be used when calling the + * DeleteDataAttributeBinding. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteDataAttributeBinding($name, $etag, array $optionalArgs = []) + { + $request = new DeleteDataAttributeBindingRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setEtag($etag); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + * must be deleted before the DataTaxonomy can be deleted. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedName = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + * $operationResponse = $dataTaxonomyServiceClient->deleteDataTaxonomy($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->deleteDataTaxonomy($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataTaxonomy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * Optional. If the client provided etag value does not match the current etag + * value,the DeleteDataTaxonomy method returns an ABORTED error. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteDataTaxonomy($name, array $optionalArgs = []) + { + $request = new DeleteDataTaxonomyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieves a Data Attribute resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedName = $dataTaxonomyServiceClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + * $response = $dataTaxonomyServiceClient->getDataAttribute($formattedName); + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\DataAttribute + * + * @throws ApiException if the remote call fails + */ + public function getDataAttribute($name, array $optionalArgs = []) + { + $request = new GetDataAttributeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDataAttribute', DataAttribute::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a DataAttributeBinding resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedName = $dataTaxonomyServiceClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + * $response = $dataTaxonomyServiceClient->getDataAttributeBinding($formattedName); + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding + * + * @throws ApiException if the remote call fails + */ + public function getDataAttributeBinding($name, array $optionalArgs = []) + { + $request = new GetDataAttributeBindingRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDataAttributeBinding', DataAttributeBinding::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a DataTaxonomy resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedName = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + * $response = $dataTaxonomyServiceClient->getDataTaxonomy($formattedName); + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\DataTaxonomy + * + * @throws ApiException if the remote call fails + */ + public function getDataTaxonomy($name, array $optionalArgs = []) + { + $request = new GetDataTaxonomyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDataTaxonomy', DataTaxonomy::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists DataAttributeBinding resources in a project and location. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributeBindings($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributeBindings($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDataAttributeBindings($parent, array $optionalArgs = []) + { + $request = new ListDataAttributeBindingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDataAttributeBindings', $optionalArgs, ListDataAttributeBindingsResponse::class, $request); + } + + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedParent = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + * // Iterate over pages of elements + * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDataAttributes($parent, array $optionalArgs = []) + { + $request = new ListDataAttributesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDataAttributes', $optionalArgs, ListDataAttributesResponse::class, $request); + } + + /** + * Lists DataTaxonomy resources in a project and location. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $dataTaxonomyServiceClient->listDataTaxonomies($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataTaxonomyServiceClient->listDataTaxonomies($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDataTaxonomies($parent, array $optionalArgs = []) + { + $request = new ListDataTaxonomiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDataTaxonomies', $optionalArgs, ListDataTaxonomiesResponse::class, $request); + } + + /** + * Updates a DataAttribute resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $dataAttribute = new DataAttribute(); + * $operationResponse = $dataTaxonomyServiceClient->updateDataAttribute($updateMask, $dataAttribute); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->updateDataAttribute($updateMask, $dataAttribute); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataAttribute'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param DataAttribute $dataAttribute Required. Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateDataAttribute($updateMask, $dataAttribute, array $optionalArgs = []) + { + $request = new UpdateDataAttributeRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setDataAttribute($dataAttribute); + $requestParamHeaders['data_attribute.name'] = $dataAttribute->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a DataAttributeBinding resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $dataAttributeBinding = new DataAttributeBinding(); + * $operationResponse = $dataTaxonomyServiceClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataAttributeBinding'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param DataAttributeBinding $dataAttributeBinding Required. Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateDataAttributeBinding($updateMask, $dataAttributeBinding, array $optionalArgs = []) + { + $request = new UpdateDataAttributeBindingRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setDataAttributeBinding($dataAttributeBinding); + $requestParamHeaders['data_attribute_binding.name'] = $dataAttributeBinding->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a DataTaxonomy resource. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $dataTaxonomy = new DataTaxonomy(); + * $operationResponse = $dataTaxonomyServiceClient->updateDataTaxonomy($updateMask, $dataTaxonomy); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataTaxonomyServiceClient->updateDataTaxonomy($updateMask, $dataTaxonomy); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataTaxonomy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param DataTaxonomy $dataTaxonomy Required. Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateDataTaxonomy($updateMask, $dataTaxonomy, array $optionalArgs = []) + { + $request = new UpdateDataTaxonomyRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setDataTaxonomy($dataTaxonomy); + $requestParamHeaders['data_taxonomy.name'] = $dataTaxonomy->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $resource = 'resource'; + * $response = $dataTaxonomyServiceClient->getIamPolicy($resource); + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $dataTaxonomyServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $dataTaxonomyServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * $response = $dataTaxonomyServiceClient->getLocation(); + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $dataTaxonomyServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataTaxonomyServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataTaxonomyServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php new file mode 100644 index 000000000000..d1182b42ab0f --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php @@ -0,0 +1,3045 @@ +jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + * $dataplexServiceClient->cancelJob($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\Dataplex\V1\Client\DataplexServiceClient} to use the new surface. + */ +class DataplexServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dataplex.v1.DataplexService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dataplex.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $assetNameTemplate; + + private static $environmentNameTemplate; + + private static $jobNameTemplate; + + private static $lakeNameTemplate; + + private static $locationNameTemplate; + + private static $taskNameTemplate; + + private static $zoneNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/dataplex_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/dataplex_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/dataplex_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/dataplex_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getAssetNameTemplate() + { + if (self::$assetNameTemplate == null) { + self::$assetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}'); + } + + return self::$assetNameTemplate; + } + + private static function getEnvironmentNameTemplate() + { + if (self::$environmentNameTemplate == null) { + self::$environmentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}'); + } + + return self::$environmentNameTemplate; + } + + private static function getJobNameTemplate() + { + if (self::$jobNameTemplate == null) { + self::$jobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}'); + } + + return self::$jobNameTemplate; + } + + private static function getLakeNameTemplate() + { + if (self::$lakeNameTemplate == null) { + self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}'); + } + + return self::$lakeNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getTaskNameTemplate() + { + if (self::$taskNameTemplate == null) { + self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}'); + } + + return self::$taskNameTemplate; + } + + private static function getZoneNameTemplate() + { + if (self::$zoneNameTemplate == null) { + self::$zoneNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}'); + } + + return self::$zoneNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'asset' => self::getAssetNameTemplate(), + 'environment' => self::getEnvironmentNameTemplate(), + 'job' => self::getJobNameTemplate(), + 'lake' => self::getLakeNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'task' => self::getTaskNameTemplate(), + 'zone' => self::getZoneNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a asset + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $asset + * + * @return string The formatted asset resource. + */ + public static function assetName($project, $location, $lake, $zone, $asset) + { + return self::getAssetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName($project, $location, $lake, $environment) + { + return self::getEnvironmentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $task + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName($project, $location, $lake, $task, $job) + { + return self::getJobNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'task' => $task, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a lake + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * + * @return string The formatted lake resource. + */ + public static function lakeName($project, $location, $lake) + { + return self::getLakeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName($project, $location, $lake, $task) + { + return self::getTaskNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'task' => $task, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a zone + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * + * @return string The formatted zone resource. + */ + public static function zoneName($project, $location, $lake, $zone) + { + return self::getZoneNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - asset: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset} + * - environment: projects/{project}/locations/{location}/lakes/{lake}/environments/{environment} + * - job: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job} + * - lake: projects/{project}/locations/{location}/lakes/{lake} + * - location: projects/{project}/locations/{location} + * - task: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task} + * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Cancel jobs running for the task resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + * $dataplexServiceClient->cancelJob($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function cancelJob($name, array $optionalArgs = []) + { + $request = new CancelJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CancelJob', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an asset resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * $assetId = 'asset_id'; + * $asset = new Asset(); + * $operationResponse = $dataplexServiceClient->createAsset($formattedParent, $assetId, $asset); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->createAsset($formattedParent, $assetId, $asset); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createAsset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param string $assetId Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * @param Asset $asset Required. Asset resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAsset($parent, $assetId, $asset, array $optionalArgs = []) + { + $request = new CreateAssetRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAssetId($assetId); + $request->setAsset($asset); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Create an environment resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * $environmentId = 'environment_id'; + * $environment = new Environment(); + * $operationResponse = $dataplexServiceClient->createEnvironment($formattedParent, $environmentId, $environment); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->createEnvironment($formattedParent, $environmentId, $environment); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createEnvironment'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @param string $environmentId Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * @param Environment $environment Required. Environment resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createEnvironment($parent, $environmentId, $environment, array $optionalArgs = []) + { + $request = new CreateEnvironmentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEnvironmentId($environmentId); + $request->setEnvironment($environment); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a lake resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $lakeId = 'lake_id'; + * $lake = new Lake(); + * $operationResponse = $dataplexServiceClient->createLake($formattedParent, $lakeId, $lake); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->createLake($formattedParent, $lakeId, $lake); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createLake'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param string $lakeId Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @param Lake $lake Required. Lake resource + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createLake($parent, $lakeId, $lake, array $optionalArgs = []) + { + $request = new CreateLakeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setLakeId($lakeId); + $request->setLake($lake); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a task resource within a lake. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * $taskId = 'task_id'; + * $task = new Task(); + * $operationResponse = $dataplexServiceClient->createTask($formattedParent, $taskId, $task); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->createTask($formattedParent, $taskId, $task); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createTask'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param string $taskId Required. Task identifier. + * @param Task $task Required. Task resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createTask($parent, $taskId, $task, array $optionalArgs = []) + { + $request = new CreateTaskRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTaskId($taskId); + $request->setTask($task); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a zone resource within a lake. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * $zoneId = 'zone_id'; + * $zone = new Zone(); + * $operationResponse = $dataplexServiceClient->createZone($formattedParent, $zoneId, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->createZone($formattedParent, $zoneId, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createZone'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param string $zoneId Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * @param Zone $zone Required. Zone resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createZone($parent, $zoneId, $zone, array $optionalArgs = []) + { + $request = new CreateZoneRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setZoneId($zoneId); + $request->setZone($zone); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes an asset resource. The referenced storage resource is detached + * (default) or deleted based on the associated Lifecycle policy. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + * $operationResponse = $dataplexServiceClient->deleteAsset($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->deleteAsset($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteAsset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteAsset($name, array $optionalArgs = []) + { + $request = new DeleteAssetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Delete the environment resource. All the child resources must have been + * deleted before environment deletion can be initiated. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + * $operationResponse = $dataplexServiceClient->deleteEnvironment($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->deleteEnvironment($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteEnvironment'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteEnvironment($name, array $optionalArgs = []) + { + $request = new DeleteEnvironmentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a lake resource. All zones within the lake must be deleted before + * the lake can be deleted. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * $operationResponse = $dataplexServiceClient->deleteLake($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->deleteLake($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteLake'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteLake($name, array $optionalArgs = []) + { + $request = new DeleteLakeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Delete the task resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + * $operationResponse = $dataplexServiceClient->deleteTask($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->deleteTask($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteTask'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteTask($name, array $optionalArgs = []) + { + $request = new DeleteTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a zone resource. All assets within a zone must be deleted before + * the zone can be deleted. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * $operationResponse = $dataplexServiceClient->deleteZone($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->deleteZone($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteZone'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteZone($name, array $optionalArgs = []) + { + $request = new DeleteZoneRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieves an asset resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + * $response = $dataplexServiceClient->getAsset($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Asset + * + * @throws ApiException if the remote call fails + */ + public function getAsset($name, array $optionalArgs = []) + { + $request = new GetAssetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAsset', Asset::class, $optionalArgs, $request)->wait(); + } + + /** + * Get environment resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + * $response = $dataplexServiceClient->getEnvironment($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Environment + * + * @throws ApiException if the remote call fails + */ + public function getEnvironment($name, array $optionalArgs = []) + { + $request = new GetEnvironmentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetEnvironment', Environment::class, $optionalArgs, $request)->wait(); + } + + /** + * Get job resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + * $response = $dataplexServiceClient->getJob($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Job + * + * @throws ApiException if the remote call fails + */ + public function getJob($name, array $optionalArgs = []) + { + $request = new GetJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetJob', Job::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a lake resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * $response = $dataplexServiceClient->getLake($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Lake + * + * @throws ApiException if the remote call fails + */ + public function getLake($name, array $optionalArgs = []) + { + $request = new GetLakeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLake', Lake::class, $optionalArgs, $request)->wait(); + } + + /** + * Get task resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + * $response = $dataplexServiceClient->getTask($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Task + * + * @throws ApiException if the remote call fails + */ + public function getTask($name, array $optionalArgs = []) + { + $request = new GetTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a zone resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * $response = $dataplexServiceClient->getZone($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Zone + * + * @throws ApiException if the remote call fails + */ + public function getZone($name, array $optionalArgs = []) + { + $request = new GetZoneRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetZone', Zone::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists action resources in an asset. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listAssetActions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listAssetActions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAssetActions($parent, array $optionalArgs = []) + { + $request = new ListAssetActionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAssetActions', $optionalArgs, ListActionsResponse::class, $request); + } + + /** + * Lists asset resources in a zone. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listAssets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listAssets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAssets($parent, array $optionalArgs = []) + { + $request = new ListAssetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAssets', $optionalArgs, ListAssetsResponse::class, $request); + } + + /** + * Lists environments under the given lake. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listEnvironments($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listEnvironments($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listEnvironments($parent, array $optionalArgs = []) + { + $request = new ListEnvironmentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEnvironments', $optionalArgs, ListEnvironmentsResponse::class, $request); + } + + /** + * Lists Jobs under the given task. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listJobs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listJobs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listJobs($parent, array $optionalArgs = []) + { + $request = new ListJobsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListJobs', $optionalArgs, ListJobsResponse::class, $request); + } + + /** + * Lists action resources in a lake. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listLakeActions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listLakeActions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLakeActions($parent, array $optionalArgs = []) + { + $request = new ListLakeActionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLakeActions', $optionalArgs, ListActionsResponse::class, $request); + } + + /** + * Lists lake resources in a project and location. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listLakes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listLakes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLakes($parent, array $optionalArgs = []) + { + $request = new ListLakesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLakes', $optionalArgs, ListLakesResponse::class, $request); + } + + /** + * Lists session resources in an environment. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listSessions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listSessions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * + * mode = ADMIN | USER + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listSessions($parent, array $optionalArgs = []) + { + $request = new ListSessionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListSessions', $optionalArgs, ListSessionsResponse::class, $request); + } + + /** + * Lists tasks under the given lake. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listTasks($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listTasks($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTasks($parent, array $optionalArgs = []) + { + $request = new ListTasksRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); + } + + /** + * Lists action resources in a zone. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listZoneActions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listZoneActions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listZoneActions($parent, array $optionalArgs = []) + { + $request = new ListZoneActionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListZoneActions', $optionalArgs, ListActionsResponse::class, $request); + } + + /** + * Lists zone resources in a lake. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listZones($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listZones($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter request. + * @type string $orderBy + * Optional. Order by fields for the result. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listZones($parent, array $optionalArgs = []) + { + $request = new ListZonesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListZones', $optionalArgs, ListZonesResponse::class, $request); + } + + /** + * Run an on demand execution of a Task. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + * $response = $dataplexServiceClient->runTask($formattedName); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type array $labels + * Optional. User-defined labels for the task. If the map is left empty, the + * task will run with existing labels from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * labels. If the map contains an entry with an existing label key in task + * definition, the task will run with new label value for that entry. Clearing + * an existing label will require label value to be explicitly set to a hyphen + * "-". The label value cannot be empty. + * @type array $args + * Optional. Execution spec arguments. If the map is left empty, the task will + * run with existing execution spec args from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * args. If the map contains an entry with an existing arg key in task + * definition, the task will run with new arg value for that entry. Clearing + * an existing arg will require arg value to be explicitly set to a hyphen + * "-". The arg value cannot be empty. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\RunTaskResponse + * + * @throws ApiException if the remote call fails + */ + public function runTask($name, array $optionalArgs = []) + { + $request = new RunTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + if (isset($optionalArgs['args'])) { + $request->setArgs($optionalArgs['args']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunTask', RunTaskResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an asset resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $asset = new Asset(); + * $operationResponse = $dataplexServiceClient->updateAsset($updateMask, $asset); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->updateAsset($updateMask, $asset); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateAsset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param Asset $asset Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAsset($updateMask, $asset, array $optionalArgs = []) + { + $request = new UpdateAssetRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setAsset($asset); + $requestParamHeaders['asset.name'] = $asset->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Update the environment resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $environment = new Environment(); + * $operationResponse = $dataplexServiceClient->updateEnvironment($updateMask, $environment); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->updateEnvironment($updateMask, $environment); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateEnvironment'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param Environment $environment Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateEnvironment($updateMask, $environment, array $optionalArgs = []) + { + $request = new UpdateEnvironmentRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setEnvironment($environment); + $requestParamHeaders['environment.name'] = $environment->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a lake resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $lake = new Lake(); + * $operationResponse = $dataplexServiceClient->updateLake($updateMask, $lake); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->updateLake($updateMask, $lake); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateLake'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param Lake $lake Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateLake($updateMask, $lake, array $optionalArgs = []) + { + $request = new UpdateLakeRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setLake($lake); + $requestParamHeaders['lake.name'] = $lake->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Update the task resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $task = new Task(); + * $operationResponse = $dataplexServiceClient->updateTask($updateMask, $task); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->updateTask($updateMask, $task); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateTask'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param Task $task Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateTask($updateMask, $task, array $optionalArgs = []) + { + $request = new UpdateTaskRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setTask($task); + $requestParamHeaders['task.name'] = $task->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a zone resource. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $updateMask = new FieldMask(); + * $zone = new Zone(); + * $operationResponse = $dataplexServiceClient->updateZone($updateMask, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $dataplexServiceClient->updateZone($updateMask, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateZone'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. Mask of fields to update. + * @param Zone $zone Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateZone($updateMask, $zone, array $optionalArgs = []) + { + $request = new UpdateZoneRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + $request->setZone($zone); + $requestParamHeaders['zone.name'] = $zone->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $resource = 'resource'; + * $response = $dataplexServiceClient->getIamPolicy($resource); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $dataplexServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $dataplexServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * $response = $dataplexServiceClient->getLocation(); + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $dataplexServiceClient = new DataplexServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $dataplexServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $dataplexServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $dataplexServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php new file mode 100644 index 000000000000..986a8c22c5af --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php @@ -0,0 +1,1132 @@ +zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * $entity = new Entity(); + * $response = $metadataServiceClient->createEntity($formattedParent, $entity); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\Dataplex\V1\Client\MetadataServiceClient} to use the new surface. + */ +class MetadataServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.dataplex.v1.MetadataService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'dataplex.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $entityNameTemplate; + + private static $partitionNameTemplate; + + private static $zoneNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/metadata_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/metadata_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/metadata_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/metadata_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getEntityNameTemplate() + { + if (self::$entityNameTemplate == null) { + self::$entityNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}'); + } + + return self::$entityNameTemplate; + } + + private static function getPartitionNameTemplate() + { + if (self::$partitionNameTemplate == null) { + self::$partitionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}'); + } + + return self::$partitionNameTemplate; + } + + private static function getZoneNameTemplate() + { + if (self::$zoneNameTemplate == null) { + self::$zoneNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}'); + } + + return self::$zoneNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'entity' => self::getEntityNameTemplate(), + 'partition' => self::getPartitionNameTemplate(), + 'zone' => self::getZoneNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a entity + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $entity + * + * @return string The formatted entity resource. + */ + public static function entityName($project, $location, $lake, $zone, $entity) + { + return self::getEntityNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'entity' => $entity, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a partition + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * @param string $entity + * @param string $partition + * + * @return string The formatted partition resource. + */ + public static function partitionName($project, $location, $lake, $zone, $entity, $partition) + { + return self::getPartitionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + 'entity' => $entity, + 'partition' => $partition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a zone + * resource. + * + * @param string $project + * @param string $location + * @param string $lake + * @param string $zone + * + * @return string The formatted zone resource. + */ + public static function zoneName($project, $location, $lake, $zone) + { + return self::getZoneNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'lake' => $lake, + 'zone' => $zone, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} + * - partition: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition} + * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'dataplex.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Create a metadata entity. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedParent = $metadataServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * $entity = new Entity(); + * $response = $metadataServiceClient->createEntity($formattedParent, $entity); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param Entity $entity Required. Entity resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Entity + * + * @throws ApiException if the remote call fails + */ + public function createEntity($parent, $entity, array $optionalArgs = []) + { + $request = new CreateEntityRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEntity($entity); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEntity', Entity::class, $optionalArgs, $request)->wait(); + } + + /** + * Create a metadata partition. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedParent = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + * $partition = new Partition(); + * $response = $metadataServiceClient->createPartition($formattedParent, $partition); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param Partition $partition Required. Partition resource. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Partition + * + * @throws ApiException if the remote call fails + */ + public function createPartition($parent, $partition, array $optionalArgs = []) + { + $request = new CreatePartitionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPartition($partition); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreatePartition', Partition::class, $optionalArgs, $request)->wait(); + } + + /** + * Delete a metadata entity. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedName = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + * $etag = 'etag'; + * $metadataServiceClient->deleteEntity($formattedName, $etag); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param string $etag Required. The etag associated with the entity, which can be retrieved with + * a [GetEntity][] request. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteEntity($name, $etag, array $optionalArgs = []) + { + $request = new DeleteEntityRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setEtag($etag); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteEntity', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Delete a metadata partition. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedName = $metadataServiceClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + * $metadataServiceClient->deletePartition($formattedName); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * Optional. The etag associated with the partition. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deletePartition($name, array $optionalArgs = []) + { + $request = new DeletePartitionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeletePartition', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a metadata entity. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedName = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + * $response = $metadataServiceClient->getEntity($formattedName); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetEntityRequest\EntityView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Entity + * + * @throws ApiException if the remote call fails + */ + public function getEntity($name, array $optionalArgs = []) + { + $request = new GetEntityRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetEntity', Entity::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a metadata partition of an entity. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedName = $metadataServiceClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + * $response = $metadataServiceClient->getPartition($formattedName); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Partition + * + * @throws ApiException if the remote call fails + */ + public function getPartition($name, array $optionalArgs = []) + { + $request = new GetPartitionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetPartition', Partition::class, $optionalArgs, $request)->wait(); + } + + /** + * List metadata entities in a zone. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedParent = $metadataServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + * $view = EntityView::ENTITY_VIEW_UNSPECIFIED; + * // Iterate over pages of elements + * $pagedResponse = $metadataServiceClient->listEntities($formattedParent, $view); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $metadataServiceClient->listEntities($formattedParent, $view); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param int $view Required. Specify the entity view to make a partial list request. + * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\ListEntitiesRequest\EntityView} + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listEntities($parent, $view, array $optionalArgs = []) + { + $request = new ListEntitiesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setView($view); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEntities', $optionalArgs, ListEntitiesResponse::class, $request); + } + + /** + * List metadata partitions of an entity. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $formattedParent = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + * // Iterate over pages of elements + * $pagedResponse = $metadataServiceClient->listPartitions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $metadataServiceClient->listPartitions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * + * **Notes:** + * + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listPartitions($parent, array $optionalArgs = []) + { + $request = new ListPartitionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListPartitions', $optionalArgs, ListPartitionsResponse::class, $request); + } + + /** + * Update a metadata entity. Only supports full resource update. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $entity = new Entity(); + * $response = $metadataServiceClient->updateEntity($entity); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param Entity $entity Required. Update description. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Dataplex\V1\Entity + * + * @throws ApiException if the remote call fails + */ + public function updateEntity($entity, array $optionalArgs = []) + { + $request = new UpdateEntityRequest(); + $requestParamHeaders = []; + $request->setEntity($entity); + $requestParamHeaders['entity.name'] = $entity->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateEntity', Entity::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $resource = 'resource'; + * $response = $metadataServiceClient->getIamPolicy($resource); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $metadataServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $metadataServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * $response = $metadataServiceClient->getLocation(); + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $metadataServiceClient = new MetadataServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $metadataServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $metadataServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $metadataServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php new file mode 100644 index 000000000000..630ed7e7aae7 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.dataplex.v1.ContentService' => [ + 'CreateContent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Content', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteContent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetContent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Content', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'ListContent' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContent', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListContentResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateContent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Content', + 'headerParams' => [ + [ + 'keyName' => 'content.name', + 'fieldAccessors' => [ + 'getContent', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'content' => 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}', + 'lake' => 'projects/{project}/locations/{location}/lakes/{lake}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php new file mode 100644 index 000000000000..a108de8fb9e9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php @@ -0,0 +1,442 @@ + [ + 'google.cloud.dataplex.v1.ContentService' => [ + 'CreateContent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/contentitems', + 'body' => 'content', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/content', + 'body' => 'content', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteContent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/content/**}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetContent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/content/**}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'ListContent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/contentitems', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/content', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateContent' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}', + 'body' => 'content', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{content.name=projects/*/locations/*/lakes/*/content/**}', + 'body' => 'content', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'content.name' => [ + 'getters' => [ + 'getContent', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json new file mode 100644 index 000000000000..d41ec81cafd9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json @@ -0,0 +1,87 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataScanService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "CreateDataScan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDataScan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDataScan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDataScanJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDataScanJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDataScans": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RunDataScan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDataScan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php new file mode 100644 index 000000000000..25e6c0424867 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php @@ -0,0 +1,221 @@ + [ + 'google.cloud.dataplex.v1.DataScanService' => [ + 'CreateDataScan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataScan', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataScan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDataScan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataScan', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'data_scan.name', + 'fieldAccessors' => [ + 'getDataScan', + 'getName', + ], + ], + ], + ], + 'GetDataScan' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\DataScan', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataScanJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\DataScanJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDataScanJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataScanJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataScanJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataScans' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataScans', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataScansResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RunDataScan' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\RunDataScanResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'dataScan' => 'projects/{project}/locations/{location}/dataScans/{dataScan}', + 'dataScanJob' => 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}', + 'entity' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php new file mode 100644 index 000000000000..320d48a5f776 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php @@ -0,0 +1,389 @@ + [ + 'google.cloud.dataplex.v1.DataScanService' => [ + 'CreateDataScan' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataScans', + 'body' => 'data_scan', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_scan_id', + ], + ], + 'DeleteDataScan' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataScan' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataScanJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDataScanJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataScans/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataScans' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataScans', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunDataScan' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDataScan' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_scan.name=projects/*/locations/*/dataScans/*}', + 'body' => 'data_scan', + 'placeholders' => [ + 'data_scan.name' => [ + 'getters' => [ + 'getDataScan', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json new file mode 100644 index 000000000000..b1b81f5e2027 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json @@ -0,0 +1,122 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataTaxonomyService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "CreateDataAttribute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateDataAttributeBinding": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateDataTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDataAttribute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDataAttributeBinding": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDataTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDataAttribute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDataAttributeBinding": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDataTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDataAttributeBindings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDataAttributes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDataTaxonomies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDataAttribute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDataAttributeBinding": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDataTaxonomy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php new file mode 100644 index 000000000000..48dcbb5a034a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php @@ -0,0 +1,357 @@ + [ + 'google.cloud.dataplex.v1.DataTaxonomyService' => [ + 'CreateDataAttribute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttribute', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataAttributeBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttributeBinding', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataTaxonomy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataTaxonomy', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataAttribute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataAttributeBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataTaxonomy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDataAttribute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttribute', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'data_attribute.name', + 'fieldAccessors' => [ + 'getDataAttribute', + 'getName', + ], + ], + ], + ], + 'UpdateDataAttributeBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttributeBinding', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'data_attribute_binding.name', + 'fieldAccessors' => [ + 'getDataAttributeBinding', + 'getName', + ], + ], + ], + ], + 'UpdateDataTaxonomy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataTaxonomy', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'data_taxonomy.name', + 'fieldAccessors' => [ + 'getDataTaxonomy', + 'getName', + ], + ], + ], + ], + 'GetDataAttribute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\DataAttribute', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataAttributeBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\DataAttributeBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTaxonomy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\DataTaxonomy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDataAttributeBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataAttributeBindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataAttributeBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataAttributes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataAttributes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataAttributesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataTaxonomies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataTaxonomies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataTaxonomiesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'dataAttribute' => 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}', + 'dataAttributeBinding' => 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}', + 'dataTaxonomy' => 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php new file mode 100644 index 000000000000..f8b9cff8373a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php @@ -0,0 +1,486 @@ + [ + 'google.cloud.dataplex.v1.DataTaxonomyService' => [ + 'CreateDataAttribute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes', + 'body' => 'data_attribute', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_attribute_id', + ], + ], + 'CreateDataAttributeBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataAttributeBindings', + 'body' => 'data_attribute_binding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_attribute_binding_id', + ], + ], + 'CreateDataTaxonomy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataTaxonomies', + 'body' => 'data_taxonomy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_taxonomy_id', + ], + ], + 'DeleteDataAttribute' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataAttributeBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataAttributeBindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'etag', + ], + ], + 'DeleteDataTaxonomy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataAttribute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataAttributeBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataAttributeBindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataTaxonomy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDataAttributeBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataAttributeBindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataAttributes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataTaxonomies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataTaxonomies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDataAttribute' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', + 'body' => 'data_attribute', + 'placeholders' => [ + 'data_attribute.name' => [ + 'getters' => [ + 'getDataAttribute', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateDataAttributeBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}', + 'body' => 'data_attribute_binding', + 'placeholders' => [ + 'data_attribute_binding.name' => [ + 'getters' => [ + 'getDataAttributeBinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateDataTaxonomy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}', + 'body' => 'data_taxonomy', + 'placeholders' => [ + 'data_taxonomy.name' => [ + 'getters' => [ + 'getDataTaxonomy', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json new file mode 100644 index 000000000000..f7ce616175a3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json @@ -0,0 +1,246 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataplexService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_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": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "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": { + "CancelJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateLake": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTask": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateZone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteLake": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTask": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteZone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLake": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTask": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetZone": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAssetActions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListAssets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListEnvironments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListLakeActions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListLakes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListSessions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListZoneActions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListZones": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "RunTask": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateLake": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTask": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateZone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php new file mode 100644 index 000000000000..bd5f19c4c2d4 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php @@ -0,0 +1,676 @@ + [ + 'google.cloud.dataplex.v1.DataplexService' => [ + 'CreateAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Asset', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Environment', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateLake' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Lake', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTask' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Task', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateZone' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Zone', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLake' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTask' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteZone' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Asset', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'asset.name', + 'fieldAccessors' => [ + 'getAsset', + 'getName', + ], + ], + ], + ], + 'UpdateEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Environment', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment.name', + 'fieldAccessors' => [ + 'getEnvironment', + 'getName', + ], + ], + ], + ], + 'UpdateLake' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Lake', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'lake.name', + 'fieldAccessors' => [ + 'getLake', + 'getName', + ], + ], + ], + ], + 'UpdateTask' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Task', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'task.name', + 'fieldAccessors' => [ + 'getTask', + 'getName', + ], + ], + ], + ], + 'UpdateZone' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Zone', + 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'zone.name', + 'fieldAccessors' => [ + 'getZone', + 'getName', + ], + ], + ], + ], + 'CancelJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Asset', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Environment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLake' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Lake', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Task', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetZone' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Zone', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAssetActions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getActions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAssets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListAssetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEnvironments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListEnvironmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLakeActions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getActions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLakes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLakes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListLakesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSessions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSessions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListSessionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTasks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListTasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListZoneActions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getActions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListZones' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getZones', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListZonesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RunTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\RunTaskResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'asset' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}', + 'environment' => 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}', + 'job' => 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}', + 'lake' => 'projects/{project}/locations/{location}/lakes/{lake}', + 'location' => 'projects/{project}/locations/{location}', + 'task' => 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}', + 'zone' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php new file mode 100644 index 000000000000..a62570d12938 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php @@ -0,0 +1,701 @@ + [ + 'google.cloud.dataplex.v1.DataplexService' => [ + 'CancelJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets', + 'body' => 'asset', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'asset_id', + ], + ], + 'CreateEnvironment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/environments', + 'body' => 'environment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'environment_id', + ], + ], + 'CreateLake' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lakes', + 'body' => 'lake', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'lake_id', + ], + ], + 'CreateTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/tasks', + 'body' => 'task', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'task_id', + ], + ], + 'CreateZone' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/zones', + 'body' => 'zone', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'zone_id', + ], + ], + 'DeleteAsset' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEnvironment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLake' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTask' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteZone' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLake' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetZone' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAssetActions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAssets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/environments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLakeActions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/actions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLakes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lakes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSessions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListZoneActions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListZones' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/zones', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAsset' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}', + 'body' => 'asset', + 'placeholders' => [ + 'asset.name' => [ + 'getters' => [ + 'getAsset', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateEnvironment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}', + 'body' => 'environment', + 'placeholders' => [ + 'environment.name' => [ + 'getters' => [ + 'getEnvironment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateLake' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{lake.name=projects/*/locations/*/lakes/*}', + 'body' => 'lake', + 'placeholders' => [ + 'lake.name' => [ + 'getters' => [ + 'getLake', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateTask' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}', + 'body' => 'task', + 'placeholders' => [ + 'task.name' => [ + 'getters' => [ + 'getTask', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateZone' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}', + 'body' => 'zone', + 'placeholders' => [ + 'zone.name' => [ + 'getters' => [ + 'getZone', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json new file mode 100644 index 000000000000..d1de1dd5770a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json @@ -0,0 +1,126 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.MetadataService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ], + "retry_policy_4_codes": [ + "UNAVAILABLE" + ], + "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_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateEntity": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreatePartition": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteEntity": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeletePartition": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetEntity": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetPartition": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListEntities": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListPartitions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "UpdateEntity": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php new file mode 100644 index 000000000000..771d154bf19c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php @@ -0,0 +1,211 @@ + [ + 'google.cloud.dataplex.v1.MetadataService' => [ + 'CreateEntity' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePartition' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Partition', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEntity' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePartition' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEntity' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPartition' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Partition', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEntities' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntities', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListEntitiesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPartitions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPartitions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\ListPartitionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEntity' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', + 'headerParams' => [ + [ + 'keyName' => 'entity.name', + 'fieldAccessors' => [ + 'getEntity', + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'entity' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}', + 'partition' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}', + 'zone' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php new file mode 100644 index 000000000000..1bb3e6834af8 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php @@ -0,0 +1,400 @@ + [ + 'google.cloud.dataplex.v1.MetadataService' => [ + 'CreateEntity' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities', + 'body' => 'entity', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePartition' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions', + 'body' => 'partition', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEntity' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'etag', + ], + ], + 'DeletePartition' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEntity' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPartition' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEntities' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'view', + ], + ], + 'ListPartitions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEntity' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}', + 'body' => 'entity', + 'placeholders' => [ + 'entity.name' => [ + 'getters' => [ + 'getEntity', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php new file mode 100644 index 000000000000..79ac7237e538 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php @@ -0,0 +1,830 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ContentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContentServiceClient($options); + } + + /** @test */ + public function createContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $path = 'path3433509'; + $description = 'description-1724546052'; + $dataText = 'dataText-363378526'; + $expectedResponse = new Content(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPath($path); + $expectedResponse->setDescription($description); + $expectedResponse->setDataText($dataText); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + $request = (new CreateContentRequest()) + ->setParent($formattedParent) + ->setContent($content); + $response = $gapicClient->createContent($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.dataplex.v1.ContentService/CreateContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + $request = (new CreateContentRequest()) + ->setParent($formattedParent) + ->setContent($content); + try { + $gapicClient->createContent($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 deleteContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + $request = (new DeleteContentRequest()) + ->setName($formattedName); + $gapicClient->deleteContent($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/DeleteContent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + $request = (new DeleteContentRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteContent($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 getContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $path = 'path3433509'; + $description = 'description-1724546052'; + $dataText = 'dataText-363378526'; + $expectedResponse = new Content(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setPath($path); + $expectedResponse->setDescription($description); + $expectedResponse->setDataText($dataText); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + $request = (new GetContentRequest()) + ->setName($formattedName); + $response = $gapicClient->getContent($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.dataplex.v1.ContentService/GetContent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + $request = (new GetContentRequest()) + ->setName($formattedName); + try { + $gapicClient->getContent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $contentElement = new Content(); + $content = [ + $contentElement, + ]; + $expectedResponse = new ListContentResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setContent($content); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListContentRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listContent($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContent()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/ListContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListContentRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listContent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $path = 'path3433509'; + $description = 'description-1724546052'; + $dataText = 'dataText-363378526'; + $expectedResponse = new Content(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPath($path); + $expectedResponse->setDescription($description); + $expectedResponse->setDataText($dataText); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + $request = (new UpdateContentRequest()) + ->setUpdateMask($updateMask) + ->setContent($content); + $response = $gapicClient->updateContent($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.dataplex.v1.ContentService/UpdateContent', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + $request = (new UpdateContentRequest()) + ->setUpdateMask($updateMask) + ->setContent($content); + try { + $gapicClient->updateContent($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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 createContentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $path = 'path3433509'; + $description = 'description-1724546052'; + $dataText = 'dataText-363378526'; + $expectedResponse = new Content(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPath($path); + $expectedResponse->setDescription($description); + $expectedResponse->setDataText($dataText); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + $request = (new CreateContentRequest()) + ->setParent($formattedParent) + ->setContent($content); + $response = $gapicClient->createContentAsync($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.dataplex.v1.ContentService/CreateContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php new file mode 100644 index 000000000000..ca99effeb95a --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php @@ -0,0 +1,1250 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataScanServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataScanServiceClient($options); + } + + /** @test */ + public function createDataScanTest() + { + $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/createDataScanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DataScan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataScanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $dataScanId = 'dataScanId1236798088'; + $request = (new CreateDataScanRequest()) + ->setParent($formattedParent) + ->setDataScan($dataScan) + ->setDataScanId($dataScanId); + $response = $gapicClient->createDataScan($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.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataScan(); + $this->assertProtobufEquals($dataScan, $actualValue); + $actualValue = $actualApiRequestObject->getDataScanId(); + $this->assertProtobufEquals($dataScanId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataScanTest'); + $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 createDataScanExceptionTest() + { + $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/createDataScanTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $dataScanId = 'dataScanId1236798088'; + $request = (new CreateDataScanRequest()) + ->setParent($formattedParent) + ->setDataScan($dataScan) + ->setDataScanId($dataScanId); + $response = $gapicClient->createDataScan($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataScanTest'); + 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 deleteDataScanTest() + { + $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/deleteDataScanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataScanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new DeleteDataScanRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataScan($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.dataplex.v1.DataScanService/DeleteDataScan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); + $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 deleteDataScanExceptionTest() + { + $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/deleteDataScanTest'); + $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 + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new DeleteDataScanRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataScan($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); + 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 getDataScanTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DataScan(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new GetDataScanRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataScan($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.dataplex.v1.DataScanService/GetDataScan', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataScanExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new GetDataScanRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataScan($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 getDataScanJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $message = 'message954925063'; + $expectedResponse = new DataScanJob(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setMessage($message); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); + $request = (new GetDataScanJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataScanJob($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.dataplex.v1.DataScanService/GetDataScanJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataScanJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); + $request = (new GetDataScanJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataScanJob($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 listDataScanJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataScanJobsElement = new DataScanJob(); + $dataScanJobs = [ + $dataScanJobsElement, + ]; + $expectedResponse = new ListDataScanJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataScanJobs($dataScanJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new ListDataScanJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataScanJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataScanJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScanJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataScanJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new ListDataScanJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataScanJobs($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 listDataScansTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataScansElement = new DataScan(); + $dataScans = [ + $dataScansElement, + ]; + $expectedResponse = new ListDataScansResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataScans($dataScans); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataScansRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataScans($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataScans()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScans', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataScansExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataScansRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataScans($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 runDataScanTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RunDataScanResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new RunDataScanRequest()) + ->setName($formattedName); + $response = $gapicClient->runDataScan($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.dataplex.v1.DataScanService/RunDataScan', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runDataScanExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $request = (new RunDataScanRequest()) + ->setName($formattedName); + try { + $gapicClient->runDataScan($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 updateDataScanTest() + { + $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/updateDataScanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DataScan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataScanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $updateMask = new FieldMask(); + $request = (new UpdateDataScanRequest()) + ->setDataScan($dataScan) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDataScan($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.dataplex.v1.DataScanService/UpdateDataScan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDataScan(); + $this->assertProtobufEquals($dataScan, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); + $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 updateDataScanExceptionTest() + { + $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/updateDataScanTest'); + $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 + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $updateMask = new FieldMask(); + $request = (new UpdateDataScanRequest()) + ->setDataScan($dataScan) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDataScan($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); + 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 createDataScanAsyncTest() + { + $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/createDataScanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DataScan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataScanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $dataScanId = 'dataScanId1236798088'; + $request = (new CreateDataScanRequest()) + ->setParent($formattedParent) + ->setDataScan($dataScan) + ->setDataScanId($dataScanId); + $response = $gapicClient->createDataScanAsync($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.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataScan(); + $this->assertProtobufEquals($dataScan, $actualValue); + $actualValue = $actualApiRequestObject->getDataScanId(); + $this->assertProtobufEquals($dataScanId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataScanTest'); + $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()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php new file mode 100644 index 000000000000..f5ad2c3769c3 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php @@ -0,0 +1,2183 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataTaxonomyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataTaxonomyServiceClient($options); + } + + /** @test */ + public function createDataAttributeTest() + { + $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/createDataAttributeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $parentId = 'parentId2070327504'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $expectedResponse = new DataAttribute(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentId($parentId); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataAttributeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $dataAttributeId = 'dataAttributeId-1927466989'; + $dataAttribute = new DataAttribute(); + $request = (new CreateDataAttributeRequest()) + ->setParent($formattedParent) + ->setDataAttributeId($dataAttributeId) + ->setDataAttribute($dataAttribute); + $response = $gapicClient->createDataAttribute($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.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeId(); + $this->assertProtobufEquals($dataAttributeId, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttribute(); + $this->assertProtobufEquals($dataAttribute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); + $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 createDataAttributeExceptionTest() + { + $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/createDataAttributeTest'); + $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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $dataAttributeId = 'dataAttributeId-1927466989'; + $dataAttribute = new DataAttribute(); + $request = (new CreateDataAttributeRequest()) + ->setParent($formattedParent) + ->setDataAttributeId($dataAttributeId) + ->setDataAttribute($dataAttribute); + $response = $gapicClient->createDataAttribute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); + 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 createDataAttributeBindingTest() + { + $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/createDataAttributeBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $resource = 'resource-341064690'; + $expectedResponse = new DataAttributeBinding(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setResource($resource); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataAttributeBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataAttributeBindingId = 'dataAttributeBindingId863052813'; + $dataAttributeBinding = new DataAttributeBinding(); + $request = (new CreateDataAttributeBindingRequest()) + ->setParent($formattedParent) + ->setDataAttributeBindingId($dataAttributeBindingId) + ->setDataAttributeBinding($dataAttributeBinding); + $response = $gapicClient->createDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeBindingId(); + $this->assertProtobufEquals($dataAttributeBindingId, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeBinding(); + $this->assertProtobufEquals($dataAttributeBinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); + $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 createDataAttributeBindingExceptionTest() + { + $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/createDataAttributeBindingTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $dataAttributeBindingId = 'dataAttributeBindingId863052813'; + $dataAttributeBinding = new DataAttributeBinding(); + $request = (new CreateDataAttributeBindingRequest()) + ->setParent($formattedParent) + ->setDataAttributeBindingId($dataAttributeBindingId) + ->setDataAttributeBinding($dataAttributeBinding); + $response = $gapicClient->createDataAttributeBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); + 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 createDataTaxonomyTest() + { + $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/createDataTaxonomyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $classCount = 424516728; + $expectedResponse = new DataTaxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $expectedResponse->setClassCount($classCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataTaxonomyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataTaxonomyId = 'dataTaxonomyId-857059404'; + $dataTaxonomy = new DataTaxonomy(); + $request = (new CreateDataTaxonomyRequest()) + ->setParent($formattedParent) + ->setDataTaxonomyId($dataTaxonomyId) + ->setDataTaxonomy($dataTaxonomy); + $response = $gapicClient->createDataTaxonomy($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.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataTaxonomyId(); + $this->assertProtobufEquals($dataTaxonomyId, $actualValue); + $actualValue = $actualApiRequestObject->getDataTaxonomy(); + $this->assertProtobufEquals($dataTaxonomy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); + $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 createDataTaxonomyExceptionTest() + { + $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/createDataTaxonomyTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $dataTaxonomyId = 'dataTaxonomyId-857059404'; + $dataTaxonomy = new DataTaxonomy(); + $request = (new CreateDataTaxonomyRequest()) + ->setParent($formattedParent) + ->setDataTaxonomyId($dataTaxonomyId) + ->setDataTaxonomy($dataTaxonomy); + $response = $gapicClient->createDataTaxonomy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); + 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 deleteDataAttributeTest() + { + $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/deleteDataAttributeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataAttributeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + $request = (new DeleteDataAttributeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataAttribute($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.dataplex.v1.DataTaxonomyService/DeleteDataAttribute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); + $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 deleteDataAttributeExceptionTest() + { + $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/deleteDataAttributeTest'); + $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 + $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + $request = (new DeleteDataAttributeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataAttribute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); + 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 deleteDataAttributeBindingTest() + { + $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/deleteDataAttributeBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataAttributeBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + $etag = 'etag3123477'; + $request = (new DeleteDataAttributeBindingRequest()) + ->setName($formattedName) + ->setEtag($etag); + $response = $gapicClient->deleteDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); + $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 deleteDataAttributeBindingExceptionTest() + { + $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/deleteDataAttributeBindingTest'); + $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 + $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + $etag = 'etag3123477'; + $request = (new DeleteDataAttributeBindingRequest()) + ->setName($formattedName) + ->setEtag($etag); + $response = $gapicClient->deleteDataAttributeBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); + 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 deleteDataTaxonomyTest() + { + $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/deleteDataTaxonomyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataTaxonomyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $request = (new DeleteDataTaxonomyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataTaxonomy($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.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); + $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 deleteDataTaxonomyExceptionTest() + { + $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/deleteDataTaxonomyTest'); + $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 + $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $request = (new DeleteDataTaxonomyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataTaxonomy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); + 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 getDataAttributeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $parentId = 'parentId2070327504'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $expectedResponse = new DataAttribute(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentId($parentId); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + $request = (new GetDataAttributeRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataAttribute($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.dataplex.v1.DataTaxonomyService/GetDataAttribute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataAttributeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + $request = (new GetDataAttributeRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataAttribute($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 getDataAttributeBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $resource = 'resource-341064690'; + $expectedResponse = new DataAttributeBinding(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setResource($resource); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + $request = (new GetDataAttributeBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataAttributeBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + $request = (new GetDataAttributeBindingRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataAttributeBinding($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 getDataTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $classCount = 424516728; + $expectedResponse = new DataTaxonomy(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $expectedResponse->setClassCount($classCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $request = (new GetDataTaxonomyRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataTaxonomy($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.dataplex.v1.DataTaxonomyService/GetDataTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $request = (new GetDataTaxonomyRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataTaxonomy($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 listDataAttributeBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataAttributeBindingsElement = new DataAttributeBinding(); + $dataAttributeBindings = [ + $dataAttributeBindingsElement, + ]; + $expectedResponse = new ListDataAttributeBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataAttributeBindings($dataAttributeBindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataAttributeBindingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataAttributeBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataAttributeBindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAttributeBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataAttributeBindingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataAttributeBindings($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 listDataAttributesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataAttributesElement = new DataAttribute(); + $dataAttributes = [ + $dataAttributesElement, + ]; + $expectedResponse = new ListDataAttributesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataAttributes($dataAttributes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $request = (new ListDataAttributesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataAttributes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataAttributes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAttributesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $request = (new ListDataAttributesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataAttributes($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 listDataTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataTaxonomiesElement = new DataTaxonomy(); + $dataTaxonomies = [ + $dataTaxonomiesElement, + ]; + $expectedResponse = new ListDataTaxonomiesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataTaxonomies($dataTaxonomies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataTaxonomiesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataTaxonomies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataTaxonomies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDataTaxonomiesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataTaxonomies($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 updateDataAttributeTest() + { + $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/updateDataAttributeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $parentId = 'parentId2070327504'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $expectedResponse = new DataAttribute(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentId($parentId); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataAttributeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $dataAttribute = new DataAttribute(); + $request = (new UpdateDataAttributeRequest()) + ->setUpdateMask($updateMask) + ->setDataAttribute($dataAttribute); + $response = $gapicClient->updateDataAttribute($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.dataplex.v1.DataTaxonomyService/UpdateDataAttribute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttribute(); + $this->assertProtobufEquals($dataAttribute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); + $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 updateDataAttributeExceptionTest() + { + $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/updateDataAttributeTest'); + $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 + $updateMask = new FieldMask(); + $dataAttribute = new DataAttribute(); + $request = (new UpdateDataAttributeRequest()) + ->setUpdateMask($updateMask) + ->setDataAttribute($dataAttribute); + $response = $gapicClient->updateDataAttribute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); + 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 updateDataAttributeBindingTest() + { + $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/updateDataAttributeBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $resource = 'resource-341064690'; + $expectedResponse = new DataAttributeBinding(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setResource($resource); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataAttributeBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $dataAttributeBinding = new DataAttributeBinding(); + $request = (new UpdateDataAttributeBindingRequest()) + ->setUpdateMask($updateMask) + ->setDataAttributeBinding($dataAttributeBinding); + $response = $gapicClient->updateDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeBinding(); + $this->assertProtobufEquals($dataAttributeBinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); + $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 updateDataAttributeBindingExceptionTest() + { + $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/updateDataAttributeBindingTest'); + $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 + $updateMask = new FieldMask(); + $dataAttributeBinding = new DataAttributeBinding(); + $request = (new UpdateDataAttributeBindingRequest()) + ->setUpdateMask($updateMask) + ->setDataAttributeBinding($dataAttributeBinding); + $response = $gapicClient->updateDataAttributeBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); + 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 updateDataTaxonomyTest() + { + $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/updateDataTaxonomyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $classCount = 424516728; + $expectedResponse = new DataTaxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $expectedResponse->setClassCount($classCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataTaxonomyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $dataTaxonomy = new DataTaxonomy(); + $request = (new UpdateDataTaxonomyRequest()) + ->setUpdateMask($updateMask) + ->setDataTaxonomy($dataTaxonomy); + $response = $gapicClient->updateDataTaxonomy($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.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getDataTaxonomy(); + $this->assertProtobufEquals($dataTaxonomy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); + $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 updateDataTaxonomyExceptionTest() + { + $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/updateDataTaxonomyTest'); + $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 + $updateMask = new FieldMask(); + $dataTaxonomy = new DataTaxonomy(); + $request = (new UpdateDataTaxonomyRequest()) + ->setUpdateMask($updateMask) + ->setDataTaxonomy($dataTaxonomy); + $response = $gapicClient->updateDataTaxonomy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); + 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 createDataAttributeAsyncTest() + { + $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/createDataAttributeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $parentId = 'parentId2070327504'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $expectedResponse = new DataAttribute(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentId($parentId); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataAttributeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $dataAttributeId = 'dataAttributeId-1927466989'; + $dataAttribute = new DataAttribute(); + $request = (new CreateDataAttributeRequest()) + ->setParent($formattedParent) + ->setDataAttributeId($dataAttributeId) + ->setDataAttribute($dataAttribute); + $response = $gapicClient->createDataAttributeAsync($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.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeId(); + $this->assertProtobufEquals($dataAttributeId, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttribute(); + $this->assertProtobufEquals($dataAttribute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); + $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()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php new file mode 100644 index 000000000000..6e788afea844 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php @@ -0,0 +1,3840 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataplexServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataplexServiceClient($options); + } + + /** @test */ + public function cancelJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + $request = (new CancelJobRequest()) + ->setName($formattedName); + $gapicClient->cancelJob($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + $request = (new CancelJobRequest()) + ->setName($formattedName); + try { + $gapicClient->cancelJob($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 createAssetTest() + { + $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/createAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $assetId = 'assetId-373202742'; + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAssetId($assetId) + ->setAsset($asset); + $response = $gapicClient->createAsset($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.dataplex.v1.DataplexService/CreateAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAssetId(); + $this->assertProtobufEquals($assetId, $actualValue); + $actualValue = $actualApiRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAssetTest'); + $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 createAssetExceptionTest() + { + $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/createAssetTest'); + $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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $assetId = 'assetId-373202742'; + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAssetId($assetId) + ->setAsset($asset); + $response = $gapicClient->createAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAssetTest'); + 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 createEnvironmentTest() + { + $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/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $environmentId = 'environmentId608412359'; + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $request = (new CreateEnvironmentRequest()) + ->setParent($formattedParent) + ->setEnvironmentId($environmentId) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironment($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.dataplex.v1.DataplexService/CreateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironmentId(); + $this->assertProtobufEquals($environmentId, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + $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 createEnvironmentExceptionTest() + { + $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/createEnvironmentTest'); + $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $environmentId = 'environmentId608412359'; + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $request = (new CreateEnvironmentRequest()) + ->setParent($formattedParent) + ->setEnvironmentId($environmentId) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + 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 createLakeTest() + { + $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/createLakeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new Lake(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLakeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $lakeId = 'lakeId-54902325'; + $lake = new Lake(); + $request = (new CreateLakeRequest()) + ->setParent($formattedParent) + ->setLakeId($lakeId) + ->setLake($lake); + $response = $gapicClient->createLake($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.dataplex.v1.DataplexService/CreateLake', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLakeId(); + $this->assertProtobufEquals($lakeId, $actualValue); + $actualValue = $actualApiRequestObject->getLake(); + $this->assertProtobufEquals($lake, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLakeTest'); + $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 createLakeExceptionTest() + { + $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/createLakeTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $lakeId = 'lakeId-54902325'; + $lake = new Lake(); + $request = (new CreateLakeRequest()) + ->setParent($formattedParent) + ->setLakeId($lakeId) + ->setLake($lake); + $response = $gapicClient->createLake($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLakeTest'); + 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 createTaskTest() + { + $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/createTaskTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTaskTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $taskId = 'taskId-1537240555'; + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $request = (new CreateTaskRequest()) + ->setParent($formattedParent) + ->setTaskId($taskId) + ->setTask($task); + $response = $gapicClient->createTask($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.dataplex.v1.DataplexService/CreateTask', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTaskId(); + $this->assertProtobufEquals($taskId, $actualValue); + $actualValue = $actualApiRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTaskTest'); + $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 createTaskExceptionTest() + { + $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/createTaskTest'); + $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $taskId = 'taskId-1537240555'; + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $request = (new CreateTaskRequest()) + ->setParent($formattedParent) + ->setTaskId($taskId) + ->setTask($task); + $response = $gapicClient->createTask($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTaskTest'); + 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 createZoneTest() + { + $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/createZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Zone(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $zoneId = 'zoneId-111174002'; + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $request = (new CreateZoneRequest()) + ->setParent($formattedParent) + ->setZoneId($zoneId) + ->setZone($zone); + $response = $gapicClient->createZone($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.dataplex.v1.DataplexService/CreateZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getZoneId(); + $this->assertProtobufEquals($zoneId, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createZoneTest'); + $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 createZoneExceptionTest() + { + $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/createZoneTest'); + $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $zoneId = 'zoneId-111174002'; + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $request = (new CreateZoneRequest()) + ->setParent($formattedParent) + ->setZoneId($zoneId) + ->setZone($zone); + $response = $gapicClient->createZone($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createZoneTest'); + 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 deleteAssetTest() + { + $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/deleteAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $request = (new DeleteAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAsset($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.dataplex.v1.DataplexService/DeleteAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); + $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 deleteAssetExceptionTest() + { + $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/deleteAssetTest'); + $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 + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $request = (new DeleteAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); + 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 deleteEnvironmentTest() + { + $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/deleteEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $request = (new DeleteEnvironmentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEnvironment($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.dataplex.v1.DataplexService/DeleteEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + $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 deleteEnvironmentExceptionTest() + { + $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/deleteEnvironmentTest'); + $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 + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $request = (new DeleteEnvironmentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + 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 deleteLakeTest() + { + $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/deleteLakeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLakeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new DeleteLakeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLake($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.dataplex.v1.DataplexService/DeleteLake', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); + $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 deleteLakeExceptionTest() + { + $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/deleteLakeTest'); + $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 + $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new DeleteLakeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLake($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); + 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 deleteTaskTest() + { + $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/deleteTaskTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTaskTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new DeleteTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTask($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.dataplex.v1.DataplexService/DeleteTask', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); + $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 deleteTaskExceptionTest() + { + $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/deleteTaskTest'); + $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 + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new DeleteTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTask($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); + 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 deleteZoneTest() + { + $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/deleteZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new DeleteZoneRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteZone($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.dataplex.v1.DataplexService/DeleteZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); + $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 deleteZoneExceptionTest() + { + $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/deleteZoneTest'); + $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 + $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new DeleteZoneRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteZone($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); + 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 getAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $request = (new GetAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->getAsset($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.dataplex.v1.DataplexService/GetAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAssetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $request = (new GetAssetRequest()) + ->setName($formattedName); + try { + $gapicClient->getAsset($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 getEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $request = (new GetEnvironmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getEnvironment($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.dataplex.v1.DataplexService/GetEnvironment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $request = (new GetEnvironmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getEnvironment($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 getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $retryCount = 928040776; + $serviceJob = 'serviceJob-1928057037'; + $message = 'message954925063'; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setRetryCount($retryCount); + $expectedResponse->setServiceJob($serviceJob); + $expectedResponse->setMessage($message); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getJob($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.dataplex.v1.DataplexService/GetJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getJob($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 getLakeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new Lake(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new GetLakeRequest()) + ->setName($formattedName); + $response = $gapicClient->getLake($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.dataplex.v1.DataplexService/GetLake', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLakeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new GetLakeRequest()) + ->setName($formattedName); + try { + $gapicClient->getLake($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 getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->getTask($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.dataplex.v1.DataplexService/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + try { + $gapicClient->getTask($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 getZoneTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Zone(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new GetZoneRequest()) + ->setName($formattedName); + $response = $gapicClient->getZone($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.dataplex.v1.DataplexService/GetZone', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getZoneExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new GetZoneRequest()) + ->setName($formattedName); + try { + $gapicClient->getZone($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 listAssetActionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $actionsElement = new Action(); + $actions = [ + $actionsElement, + ]; + $expectedResponse = new ListActionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActions($actions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $request = (new ListAssetActionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAssetActions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssetActions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetActionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $request = (new ListAssetActionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAssetActions($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 listAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $assetsElement = new Asset(); + $assets = [ + $assetsElement, + ]; + $expectedResponse = new ListAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAssets($assets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new ListAssetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAssets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new ListAssetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAssets($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 listEnvironmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $environmentsElement = new Environment(); + $environments = [ + $environmentsElement, + ]; + $expectedResponse = new ListEnvironmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEnvironments($environments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListEnvironmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEnvironments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListEnvironments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListEnvironmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEnvironments($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 listJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobsElement = new Job(); + $jobs = [ + $jobsElement, + ]; + $expectedResponse = new ListJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobs($jobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new ListJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new ListJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listJobs($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 listLakeActionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $actionsElement = new Action(); + $actions = [ + $actionsElement, + ]; + $expectedResponse = new ListActionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActions($actions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListLakeActionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLakeActions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakeActions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLakeActionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListLakeActionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLakeActions($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 listLakesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $lakesElement = new Lake(); + $lakes = [ + $lakesElement, + ]; + $expectedResponse = new ListLakesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLakes($lakes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLakesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLakes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLakes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLakesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLakesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLakes($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 listSessionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sessionsElement = new Session(); + $sessions = [ + $sessionsElement, + ]; + $expectedResponse = new ListSessionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSessions($sessions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $request = (new ListSessionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSessions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSessions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListSessions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $request = (new ListSessionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSessions($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 listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTasks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTasks($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 listZoneActionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $actionsElement = new Action(); + $actions = [ + $actionsElement, + ]; + $expectedResponse = new ListActionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActions($actions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new ListZoneActionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listZoneActions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZoneActions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listZoneActionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $request = (new ListZoneActionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listZoneActions($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 listZonesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $zonesElement = new Zone(); + $zones = [ + $zonesElement, + ]; + $expectedResponse = new ListZonesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setZones($zones); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListZonesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listZones($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getZones()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZones', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listZonesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $request = (new ListZonesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listZones($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 runTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RunTaskResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new RunTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->runTask($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.dataplex.v1.DataplexService/RunTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $request = (new RunTaskRequest()) + ->setName($formattedName); + try { + $gapicClient->runTask($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 updateAssetTest() + { + $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/updateAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $request = (new UpdateAssetRequest()) + ->setUpdateMask($updateMask) + ->setAsset($asset); + $response = $gapicClient->updateAsset($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.dataplex.v1.DataplexService/UpdateAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAssetTest'); + $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 updateAssetExceptionTest() + { + $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/updateAssetTest'); + $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 + $updateMask = new FieldMask(); + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $request = (new UpdateAssetRequest()) + ->setUpdateMask($updateMask) + ->setAsset($asset); + $response = $gapicClient->updateAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAssetTest'); + 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 updateEnvironmentTest() + { + $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/updateEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $request = (new UpdateEnvironmentRequest()) + ->setUpdateMask($updateMask) + ->setEnvironment($environment); + $response = $gapicClient->updateEnvironment($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.dataplex.v1.DataplexService/UpdateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + $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 updateEnvironmentExceptionTest() + { + $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/updateEnvironmentTest'); + $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 + $updateMask = new FieldMask(); + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $request = (new UpdateEnvironmentRequest()) + ->setUpdateMask($updateMask) + ->setEnvironment($environment); + $response = $gapicClient->updateEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + 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 updateLakeTest() + { + $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/updateLakeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new Lake(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateLakeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $lake = new Lake(); + $request = (new UpdateLakeRequest()) + ->setUpdateMask($updateMask) + ->setLake($lake); + $response = $gapicClient->updateLake($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.dataplex.v1.DataplexService/UpdateLake', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getLake(); + $this->assertProtobufEquals($lake, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLakeTest'); + $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 updateLakeExceptionTest() + { + $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/updateLakeTest'); + $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 + $updateMask = new FieldMask(); + $lake = new Lake(); + $request = (new UpdateLakeRequest()) + ->setUpdateMask($updateMask) + ->setLake($lake); + $response = $gapicClient->updateLake($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLakeTest'); + 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 updateTaskTest() + { + $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/updateTaskTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTaskTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $request = (new UpdateTaskRequest()) + ->setUpdateMask($updateMask) + ->setTask($task); + $response = $gapicClient->updateTask($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.dataplex.v1.DataplexService/UpdateTask', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTaskTest'); + $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 updateTaskExceptionTest() + { + $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/updateTaskTest'); + $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 + $updateMask = new FieldMask(); + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $request = (new UpdateTaskRequest()) + ->setUpdateMask($updateMask) + ->setTask($task); + $response = $gapicClient->updateTask($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTaskTest'); + 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 updateZoneTest() + { + $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/updateZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Zone(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $request = (new UpdateZoneRequest()) + ->setUpdateMask($updateMask) + ->setZone($zone); + $response = $gapicClient->updateZone($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.dataplex.v1.DataplexService/UpdateZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateZoneTest'); + $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 updateZoneExceptionTest() + { + $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/updateZoneTest'); + $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 + $updateMask = new FieldMask(); + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $request = (new UpdateZoneRequest()) + ->setUpdateMask($updateMask) + ->setZone($zone); + $response = $gapicClient->updateZone($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateZoneTest'); + 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 cancelJobAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + $request = (new CancelJobRequest()) + ->setName($formattedName); + $gapicClient->cancelJobAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php new file mode 100644 index 000000000000..cc460c9d5df6 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php @@ -0,0 +1,1239 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MetadataServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MetadataServiceClient($options); + } + + /** @test */ + public function createEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $id = 'id3355'; + $etag = 'etag3123477'; + $asset = 'asset93121264'; + $dataPath = 'dataPath-363501670'; + $dataPathPattern = 'dataPathPattern-594427925'; + $catalogEntry = 'catalogEntry-1234004788'; + $uid = 'uid115792'; + $expectedResponse = new Entity(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setEtag($etag); + $expectedResponse->setAsset($asset); + $expectedResponse->setDataPath($dataPath); + $expectedResponse->setDataPathPattern($dataPathPattern); + $expectedResponse->setCatalogEntry($catalogEntry); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + $request = (new CreateEntityRequest()) + ->setParent($formattedParent) + ->setEntity($entity); + $response = $gapicClient->createEntity($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.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntity(); + $this->assertProtobufEquals($entity, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + $request = (new CreateEntityRequest()) + ->setParent($formattedParent) + ->setEntity($entity); + try { + $gapicClient->createEntity($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 createPartitionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $location = 'location1901043637'; + $etag = 'etag3123477'; + $expectedResponse = new Partition(); + $expectedResponse->setName($name); + $expectedResponse->setLocation($location); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $partition = new Partition(); + $partitionValues = []; + $partition->setValues($partitionValues); + $partitionLocation = 'partitionLocation-1757508417'; + $partition->setLocation($partitionLocation); + $request = (new CreatePartitionRequest()) + ->setParent($formattedParent) + ->setPartition($partition); + $response = $gapicClient->createPartition($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.dataplex.v1.MetadataService/CreatePartition', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPartition(); + $this->assertProtobufEquals($partition, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPartitionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $partition = new Partition(); + $partitionValues = []; + $partition->setValues($partitionValues); + $partitionLocation = 'partitionLocation-1757508417'; + $partition->setLocation($partitionLocation); + $request = (new CreatePartitionRequest()) + ->setParent($formattedParent) + ->setPartition($partition); + try { + $gapicClient->createPartition($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 deleteEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $etag = 'etag3123477'; + $request = (new DeleteEntityRequest()) + ->setName($formattedName) + ->setEtag($etag); + $gapicClient->deleteEntity($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeleteEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $etag = 'etag3123477'; + $request = (new DeleteEntityRequest()) + ->setName($formattedName) + ->setEtag($etag); + try { + $gapicClient->deleteEntity($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 deletePartitionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + $request = (new DeletePartitionRequest()) + ->setName($formattedName); + $gapicClient->deletePartition($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeletePartition', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePartitionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + $request = (new DeletePartitionRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePartition($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 getEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $id = 'id3355'; + $etag = 'etag3123477'; + $asset = 'asset93121264'; + $dataPath = 'dataPath-363501670'; + $dataPathPattern = 'dataPathPattern-594427925'; + $catalogEntry = 'catalogEntry-1234004788'; + $uid = 'uid115792'; + $expectedResponse = new Entity(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setEtag($etag); + $expectedResponse->setAsset($asset); + $expectedResponse->setDataPath($dataPath); + $expectedResponse->setDataPathPattern($dataPathPattern); + $expectedResponse->setCatalogEntry($catalogEntry); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $request = (new GetEntityRequest()) + ->setName($formattedName); + $response = $gapicClient->getEntity($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.dataplex.v1.MetadataService/GetEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $request = (new GetEntityRequest()) + ->setName($formattedName); + try { + $gapicClient->getEntity($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 getPartitionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $etag = 'etag3123477'; + $expectedResponse = new Partition(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + $request = (new GetPartitionRequest()) + ->setName($formattedName); + $response = $gapicClient->getPartition($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.dataplex.v1.MetadataService/GetPartition', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPartitionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + $request = (new GetPartitionRequest()) + ->setName($formattedName); + try { + $gapicClient->getPartition($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 listEntitiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entitiesElement = new Entity(); + $entities = [ + $entitiesElement, + ]; + $expectedResponse = new ListEntitiesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntities($entities); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $view = EntityView::ENTITY_VIEW_UNSPECIFIED; + $request = (new ListEntitiesRequest()) + ->setParent($formattedParent) + ->setView($view); + $response = $gapicClient->listEntities($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntities()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListEntities', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntitiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $view = EntityView::ENTITY_VIEW_UNSPECIFIED; + $request = (new ListEntitiesRequest()) + ->setParent($formattedParent) + ->setView($view); + try { + $gapicClient->listEntities($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 listPartitionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $partitionsElement = new Partition(); + $partitions = [ + $partitionsElement, + ]; + $expectedResponse = new ListPartitionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPartitions($partitions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $request = (new ListPartitionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPartitions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListPartitions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPartitionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $request = (new ListPartitionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPartitions($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 updateEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $id = 'id3355'; + $etag = 'etag3123477'; + $asset = 'asset93121264'; + $dataPath = 'dataPath-363501670'; + $dataPathPattern = 'dataPathPattern-594427925'; + $catalogEntry = 'catalogEntry-1234004788'; + $uid = 'uid115792'; + $expectedResponse = new Entity(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setEtag($etag); + $expectedResponse->setAsset($asset); + $expectedResponse->setDataPath($dataPath); + $expectedResponse->setDataPathPattern($dataPathPattern); + $expectedResponse->setCatalogEntry($catalogEntry); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + $request = (new UpdateEntityRequest()) + ->setEntity($entity); + $response = $gapicClient->updateEntity($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.dataplex.v1.MetadataService/UpdateEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getEntity(); + $this->assertProtobufEquals($entity, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + $request = (new UpdateEntityRequest()) + ->setEntity($entity); + try { + $gapicClient->updateEntity($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 createEntityAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $id = 'id3355'; + $etag = 'etag3123477'; + $asset = 'asset93121264'; + $dataPath = 'dataPath-363501670'; + $dataPathPattern = 'dataPathPattern-594427925'; + $catalogEntry = 'catalogEntry-1234004788'; + $uid = 'uid115792'; + $expectedResponse = new Entity(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setEtag($etag); + $expectedResponse->setAsset($asset); + $expectedResponse->setDataPath($dataPath); + $expectedResponse->setDataPathPattern($dataPathPattern); + $expectedResponse->setCatalogEntry($catalogEntry); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + $request = (new CreateEntityRequest()) + ->setParent($formattedParent) + ->setEntity($entity); + $response = $gapicClient->createEntityAsync($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.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntity(); + $this->assertProtobufEquals($entity, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php new file mode 100644 index 000000000000..beaa6b9c313c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php @@ -0,0 +1,731 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ContentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContentServiceClient($options); + } + + /** @test */ + public function createContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $path = 'path3433509'; + $description = 'description-1724546052'; + $dataText = 'dataText-363378526'; + $expectedResponse = new Content(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPath($path); + $expectedResponse->setDescription($description); + $expectedResponse->setDataText($dataText); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + $response = $gapicClient->createContent($formattedParent, $content); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/CreateContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + try { + $gapicClient->createContent($formattedParent, $content); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + $gapicClient->deleteContent($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/DeleteContent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + try { + $gapicClient->deleteContent($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $path = 'path3433509'; + $description = 'description-1724546052'; + $dataText = 'dataText-363378526'; + $expectedResponse = new Content(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setPath($path); + $expectedResponse->setDescription($description); + $expectedResponse->setDataText($dataText); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + $response = $gapicClient->getContent($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetContent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); + try { + $gapicClient->getContent($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $contentElement = new Content(); + $content = [ + $contentElement, + ]; + $expectedResponse = new ListContentResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setContent($content); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->listContent($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContent()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/ListContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + try { + $gapicClient->listContent($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uid = 'uid115792'; + $path = 'path3433509'; + $description = 'description-1724546052'; + $dataText = 'dataText-363378526'; + $expectedResponse = new Content(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setPath($path); + $expectedResponse->setDescription($description); + $expectedResponse->setDataText($dataText); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + $response = $gapicClient->updateContent($updateMask, $content); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.ContentService/UpdateContent', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $content = new Content(); + $contentPath = 'contentPath-389273538'; + $content->setPath($contentPath); + $contentDataText = 'contentDataText-82259056'; + $content->setDataText($contentDataText); + try { + $gapicClient->updateContent($updateMask, $content); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php new file mode 100644 index 000000000000..a9d0fb1b8bea --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php @@ -0,0 +1,1097 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataScanServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataScanServiceClient($options); + } + + /** @test */ + public function createDataScanTest() + { + $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/createDataScanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DataScan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataScanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $dataScanId = 'dataScanId1236798088'; + $response = $gapicClient->createDataScan($formattedParent, $dataScan, $dataScanId); + $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.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataScan(); + $this->assertProtobufEquals($dataScan, $actualValue); + $actualValue = $actualApiRequestObject->getDataScanId(); + $this->assertProtobufEquals($dataScanId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataScanTest'); + $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 createDataScanExceptionTest() + { + $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/createDataScanTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $dataScanId = 'dataScanId1236798088'; + $response = $gapicClient->createDataScan($formattedParent, $dataScan, $dataScanId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataScanTest'); + 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 deleteDataScanTest() + { + $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/deleteDataScanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataScanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $response = $gapicClient->deleteDataScan($formattedName); + $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.dataplex.v1.DataScanService/DeleteDataScan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); + $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 deleteDataScanExceptionTest() + { + $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/deleteDataScanTest'); + $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 + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $response = $gapicClient->deleteDataScan($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); + 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 getDataScanTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DataScan(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $response = $gapicClient->getDataScan($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScan', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataScanExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + try { + $gapicClient->getDataScan($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataScanJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $message = 'message954925063'; + $expectedResponse = new DataScanJob(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setMessage($message); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); + $response = $gapicClient->getDataScanJob($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScanJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataScanJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); + try { + $gapicClient->getDataScanJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataScanJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataScanJobsElement = new DataScanJob(); + $dataScanJobs = [ + $dataScanJobsElement, + ]; + $expectedResponse = new ListDataScanJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataScanJobs($dataScanJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $response = $gapicClient->listDataScanJobs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataScanJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScanJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataScanJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + try { + $gapicClient->listDataScanJobs($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataScansTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataScansElement = new DataScan(); + $dataScans = [ + $dataScansElement, + ]; + $expectedResponse = new ListDataScansResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataScans($dataScans); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listDataScans($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataScans()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScans', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataScansExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listDataScans($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runDataScanTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RunDataScanResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + $response = $gapicClient->runDataScan($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataScanService/RunDataScan', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runDataScanExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); + try { + $gapicClient->runDataScan($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataScanTest() + { + $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/updateDataScanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DataScan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataScanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $updateMask = new FieldMask(); + $response = $gapicClient->updateDataScan($dataScan, $updateMask); + $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.dataplex.v1.DataScanService/UpdateDataScan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDataScan(); + $this->assertProtobufEquals($dataScan, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); + $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 updateDataScanExceptionTest() + { + $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/updateDataScanTest'); + $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 + $dataScan = new DataScan(); + $dataScanData = new DataSource(); + $dataScan->setData($dataScanData); + $updateMask = new FieldMask(); + $response = $gapicClient->updateDataScan($dataScan, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); + 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php new file mode 100644 index 000000000000..8031c614b69c --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php @@ -0,0 +1,1977 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataTaxonomyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataTaxonomyServiceClient($options); + } + + /** @test */ + public function createDataAttributeTest() + { + $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/createDataAttributeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $parentId = 'parentId2070327504'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $expectedResponse = new DataAttribute(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentId($parentId); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataAttributeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $dataAttributeId = 'dataAttributeId-1927466989'; + $dataAttribute = new DataAttribute(); + $response = $gapicClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); + $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.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeId(); + $this->assertProtobufEquals($dataAttributeId, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttribute(); + $this->assertProtobufEquals($dataAttribute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); + $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 createDataAttributeExceptionTest() + { + $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/createDataAttributeTest'); + $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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $dataAttributeId = 'dataAttributeId-1927466989'; + $dataAttribute = new DataAttribute(); + $response = $gapicClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); + 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 createDataAttributeBindingTest() + { + $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/createDataAttributeBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $resource = 'resource-341064690'; + $expectedResponse = new DataAttributeBinding(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setResource($resource); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataAttributeBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataAttributeBindingId = 'dataAttributeBindingId863052813'; + $dataAttributeBinding = new DataAttributeBinding(); + $response = $gapicClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); + $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.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeBindingId(); + $this->assertProtobufEquals($dataAttributeBindingId, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeBinding(); + $this->assertProtobufEquals($dataAttributeBinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); + $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 createDataAttributeBindingExceptionTest() + { + $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/createDataAttributeBindingTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $dataAttributeBindingId = 'dataAttributeBindingId863052813'; + $dataAttributeBinding = new DataAttributeBinding(); + $response = $gapicClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); + 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 createDataTaxonomyTest() + { + $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/createDataTaxonomyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $classCount = 424516728; + $expectedResponse = new DataTaxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $expectedResponse->setClassCount($classCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDataTaxonomyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataTaxonomyId = 'dataTaxonomyId-857059404'; + $dataTaxonomy = new DataTaxonomy(); + $response = $gapicClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); + $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.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataTaxonomyId(); + $this->assertProtobufEquals($dataTaxonomyId, $actualValue); + $actualValue = $actualApiRequestObject->getDataTaxonomy(); + $this->assertProtobufEquals($dataTaxonomy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); + $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 createDataTaxonomyExceptionTest() + { + $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/createDataTaxonomyTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $dataTaxonomyId = 'dataTaxonomyId-857059404'; + $dataTaxonomy = new DataTaxonomy(); + $response = $gapicClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); + 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 deleteDataAttributeTest() + { + $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/deleteDataAttributeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataAttributeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + $response = $gapicClient->deleteDataAttribute($formattedName); + $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.dataplex.v1.DataTaxonomyService/DeleteDataAttribute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); + $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 deleteDataAttributeExceptionTest() + { + $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/deleteDataAttributeTest'); + $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 + $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + $response = $gapicClient->deleteDataAttribute($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); + 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 deleteDataAttributeBindingTest() + { + $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/deleteDataAttributeBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataAttributeBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + $etag = 'etag3123477'; + $response = $gapicClient->deleteDataAttributeBinding($formattedName, $etag); + $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.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); + $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 deleteDataAttributeBindingExceptionTest() + { + $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/deleteDataAttributeBindingTest'); + $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 + $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + $etag = 'etag3123477'; + $response = $gapicClient->deleteDataAttributeBinding($formattedName, $etag); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); + 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 deleteDataTaxonomyTest() + { + $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/deleteDataTaxonomyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDataTaxonomyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $response = $gapicClient->deleteDataTaxonomy($formattedName); + $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.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); + $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 deleteDataTaxonomyExceptionTest() + { + $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/deleteDataTaxonomyTest'); + $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 + $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $response = $gapicClient->deleteDataTaxonomy($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); + 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 getDataAttributeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $parentId = 'parentId2070327504'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $expectedResponse = new DataAttribute(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentId($parentId); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + $response = $gapicClient->getDataAttribute($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttribute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataAttributeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); + try { + $gapicClient->getDataAttribute($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataAttributeBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $resource = 'resource-341064690'; + $expectedResponse = new DataAttributeBinding(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setResource($resource); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + $response = $gapicClient->getDataAttributeBinding($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataAttributeBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); + try { + $gapicClient->getDataAttributeBinding($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataTaxonomyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $classCount = 424516728; + $expectedResponse = new DataTaxonomy(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $expectedResponse->setClassCount($classCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $response = $gapicClient->getDataTaxonomy($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataTaxonomy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataTaxonomyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + try { + $gapicClient->getDataTaxonomy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAttributeBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataAttributeBindingsElement = new DataAttributeBinding(); + $dataAttributeBindings = [ + $dataAttributeBindingsElement, + ]; + $expectedResponse = new ListDataAttributeBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataAttributeBindings($dataAttributeBindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listDataAttributeBindings($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataAttributeBindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAttributeBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listDataAttributeBindings($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAttributesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataAttributesElement = new DataAttribute(); + $dataAttributes = [ + $dataAttributesElement, + ]; + $expectedResponse = new ListDataAttributesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataAttributes($dataAttributes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + $response = $gapicClient->listDataAttributes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataAttributes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataAttributesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); + try { + $gapicClient->listDataAttributes($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataTaxonomiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataTaxonomiesElement = new DataTaxonomy(); + $dataTaxonomies = [ + $dataTaxonomiesElement, + ]; + $expectedResponse = new ListDataTaxonomiesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataTaxonomies($dataTaxonomies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listDataTaxonomies($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataTaxonomies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataTaxonomiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listDataTaxonomies($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataAttributeTest() + { + $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/updateDataAttributeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $parentId = 'parentId2070327504'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $expectedResponse = new DataAttribute(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentId($parentId); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataAttributeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $dataAttribute = new DataAttribute(); + $response = $gapicClient->updateDataAttribute($updateMask, $dataAttribute); + $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.dataplex.v1.DataTaxonomyService/UpdateDataAttribute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttribute(); + $this->assertProtobufEquals($dataAttribute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); + $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 updateDataAttributeExceptionTest() + { + $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/updateDataAttributeTest'); + $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 + $updateMask = new FieldMask(); + $dataAttribute = new DataAttribute(); + $response = $gapicClient->updateDataAttribute($updateMask, $dataAttribute); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); + 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 updateDataAttributeBindingTest() + { + $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/updateDataAttributeBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $resource = 'resource-341064690'; + $expectedResponse = new DataAttributeBinding(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setResource($resource); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataAttributeBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $dataAttributeBinding = new DataAttributeBinding(); + $response = $gapicClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); + $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.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getDataAttributeBinding(); + $this->assertProtobufEquals($dataAttributeBinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); + $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 updateDataAttributeBindingExceptionTest() + { + $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/updateDataAttributeBindingTest'); + $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 + $updateMask = new FieldMask(); + $dataAttributeBinding = new DataAttributeBinding(); + $response = $gapicClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); + 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 updateDataTaxonomyTest() + { + $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/updateDataTaxonomyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $attributeCount = 688916052; + $etag = 'etag3123477'; + $classCount = 424516728; + $expectedResponse = new DataTaxonomy(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAttributeCount($attributeCount); + $expectedResponse->setEtag($etag); + $expectedResponse->setClassCount($classCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDataTaxonomyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $dataTaxonomy = new DataTaxonomy(); + $response = $gapicClient->updateDataTaxonomy($updateMask, $dataTaxonomy); + $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.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getDataTaxonomy(); + $this->assertProtobufEquals($dataTaxonomy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); + $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 updateDataTaxonomyExceptionTest() + { + $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/updateDataTaxonomyTest'); + $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 + $updateMask = new FieldMask(); + $dataTaxonomy = new DataTaxonomy(); + $response = $gapicClient->updateDataTaxonomy($updateMask, $dataTaxonomy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); + 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php new file mode 100644 index 000000000000..94498deca084 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php @@ -0,0 +1,3594 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataplexServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataplexServiceClient($options); + } + + /** @test */ + public function cancelJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + $gapicClient->cancelJob($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + try { + $gapicClient->cancelJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAssetTest() + { + $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/createAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $assetId = 'assetId-373202742'; + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $response = $gapicClient->createAsset($formattedParent, $assetId, $asset); + $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.dataplex.v1.DataplexService/CreateAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAssetId(); + $this->assertProtobufEquals($assetId, $actualValue); + $actualValue = $actualApiRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAssetTest'); + $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 createAssetExceptionTest() + { + $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/createAssetTest'); + $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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $assetId = 'assetId-373202742'; + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $response = $gapicClient->createAsset($formattedParent, $assetId, $asset); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAssetTest'); + 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 createEnvironmentTest() + { + $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/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $environmentId = 'environmentId608412359'; + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $response = $gapicClient->createEnvironment($formattedParent, $environmentId, $environment); + $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.dataplex.v1.DataplexService/CreateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironmentId(); + $this->assertProtobufEquals($environmentId, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + $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 createEnvironmentExceptionTest() + { + $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/createEnvironmentTest'); + $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $environmentId = 'environmentId608412359'; + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $response = $gapicClient->createEnvironment($formattedParent, $environmentId, $environment); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + 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 createLakeTest() + { + $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/createLakeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new Lake(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLakeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $lakeId = 'lakeId-54902325'; + $lake = new Lake(); + $response = $gapicClient->createLake($formattedParent, $lakeId, $lake); + $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.dataplex.v1.DataplexService/CreateLake', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLakeId(); + $this->assertProtobufEquals($lakeId, $actualValue); + $actualValue = $actualApiRequestObject->getLake(); + $this->assertProtobufEquals($lake, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLakeTest'); + $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 createLakeExceptionTest() + { + $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/createLakeTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $lakeId = 'lakeId-54902325'; + $lake = new Lake(); + $response = $gapicClient->createLake($formattedParent, $lakeId, $lake); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLakeTest'); + 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 createTaskTest() + { + $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/createTaskTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTaskTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $taskId = 'taskId-1537240555'; + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $response = $gapicClient->createTask($formattedParent, $taskId, $task); + $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.dataplex.v1.DataplexService/CreateTask', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTaskId(); + $this->assertProtobufEquals($taskId, $actualValue); + $actualValue = $actualApiRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTaskTest'); + $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 createTaskExceptionTest() + { + $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/createTaskTest'); + $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $taskId = 'taskId-1537240555'; + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $response = $gapicClient->createTask($formattedParent, $taskId, $task); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTaskTest'); + 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 createZoneTest() + { + $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/createZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Zone(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $zoneId = 'zoneId-111174002'; + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $response = $gapicClient->createZone($formattedParent, $zoneId, $zone); + $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.dataplex.v1.DataplexService/CreateZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getZoneId(); + $this->assertProtobufEquals($zoneId, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createZoneTest'); + $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 createZoneExceptionTest() + { + $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/createZoneTest'); + $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $zoneId = 'zoneId-111174002'; + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $response = $gapicClient->createZone($formattedParent, $zoneId, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createZoneTest'); + 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 deleteAssetTest() + { + $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/deleteAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $response = $gapicClient->deleteAsset($formattedName); + $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.dataplex.v1.DataplexService/DeleteAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); + $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 deleteAssetExceptionTest() + { + $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/deleteAssetTest'); + $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 + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $response = $gapicClient->deleteAsset($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); + 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 deleteEnvironmentTest() + { + $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/deleteEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $response = $gapicClient->deleteEnvironment($formattedName); + $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.dataplex.v1.DataplexService/DeleteEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + $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 deleteEnvironmentExceptionTest() + { + $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/deleteEnvironmentTest'); + $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 + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $response = $gapicClient->deleteEnvironment($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + 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 deleteLakeTest() + { + $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/deleteLakeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLakeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->deleteLake($formattedName); + $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.dataplex.v1.DataplexService/DeleteLake', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); + $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 deleteLakeExceptionTest() + { + $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/deleteLakeTest'); + $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 + $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->deleteLake($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); + 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 deleteTaskTest() + { + $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/deleteTaskTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTaskTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $response = $gapicClient->deleteTask($formattedName); + $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.dataplex.v1.DataplexService/DeleteTask', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); + $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 deleteTaskExceptionTest() + { + $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/deleteTaskTest'); + $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 + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $response = $gapicClient->deleteTask($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); + 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 deleteZoneTest() + { + $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/deleteZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $response = $gapicClient->deleteZone($formattedName); + $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.dataplex.v1.DataplexService/DeleteZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); + $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 deleteZoneExceptionTest() + { + $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/deleteZoneTest'); + $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 + $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $response = $gapicClient->deleteZone($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); + 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 getAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $response = $gapicClient->getAsset($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAssetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + try { + $gapicClient->getAsset($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $response = $gapicClient->getEnvironment($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetEnvironment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + try { + $gapicClient->getEnvironment($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $retryCount = 928040776; + $serviceJob = 'serviceJob-1928057037'; + $message = 'message954925063'; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setRetryCount($retryCount); + $expectedResponse->setServiceJob($serviceJob); + $expectedResponse->setMessage($message); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + $response = $gapicClient->getJob($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); + try { + $gapicClient->getJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLakeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new Lake(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->getLake($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetLake', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLakeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + try { + $gapicClient->getLake($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $response = $gapicClient->getTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + try { + $gapicClient->getTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getZoneTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Zone(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $response = $gapicClient->getZone($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetZone', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getZoneExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + try { + $gapicClient->getZone($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetActionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $actionsElement = new Action(); + $actions = [ + $actionsElement, + ]; + $expectedResponse = new ListActionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActions($actions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + $response = $gapicClient->listAssetActions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssetActions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetActionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); + try { + $gapicClient->listAssetActions($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $assetsElement = new Asset(); + $assets = [ + $assetsElement, + ]; + $expectedResponse = new ListAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAssets($assets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $response = $gapicClient->listAssets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + try { + $gapicClient->listAssets($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $environmentsElement = new Environment(); + $environments = [ + $environmentsElement, + ]; + $expectedResponse = new ListEnvironmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEnvironments($environments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->listEnvironments($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListEnvironments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + try { + $gapicClient->listEnvironments($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobsElement = new Job(); + $jobs = [ + $jobsElement, + ]; + $expectedResponse = new ListJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobs($jobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $response = $gapicClient->listJobs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + try { + $gapicClient->listJobs($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLakeActionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $actionsElement = new Action(); + $actions = [ + $actionsElement, + ]; + $expectedResponse = new ListActionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActions($actions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->listLakeActions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakeActions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLakeActionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + try { + $gapicClient->listLakeActions($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLakesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $lakesElement = new Lake(); + $lakes = [ + $lakesElement, + ]; + $expectedResponse = new ListLakesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLakes($lakes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listLakes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLakes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLakesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listLakes($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sessionsElement = new Session(); + $sessions = [ + $sessionsElement, + ]; + $expectedResponse = new ListSessionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSessions($sessions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + $response = $gapicClient->listSessions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSessions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListSessions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); + try { + $gapicClient->listSessions($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->listTasks($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + try { + $gapicClient->listTasks($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listZoneActionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $actionsElement = new Action(); + $actions = [ + $actionsElement, + ]; + $expectedResponse = new ListActionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActions($actions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $response = $gapicClient->listZoneActions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZoneActions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listZoneActionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + try { + $gapicClient->listZoneActions($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listZonesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $zonesElement = new Zone(); + $zones = [ + $zonesElement, + ]; + $expectedResponse = new ListZonesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setZones($zones); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + $response = $gapicClient->listZones($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getZones()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZones', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listZonesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); + try { + $gapicClient->listZones($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RunTaskResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + $response = $gapicClient->runTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.DataplexService/RunTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); + try { + $gapicClient->runTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAssetTest() + { + $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/updateAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $response = $gapicClient->updateAsset($updateMask, $asset); + $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.dataplex.v1.DataplexService/UpdateAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAssetTest'); + $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 updateAssetExceptionTest() + { + $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/updateAssetTest'); + $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 + $updateMask = new FieldMask(); + $asset = new Asset(); + $assetResourceSpec = new ResourceSpec(); + $resourceSpecType = Type::TYPE_UNSPECIFIED; + $assetResourceSpec->setType($resourceSpecType); + $asset->setResourceSpec($assetResourceSpec); + $response = $gapicClient->updateAsset($updateMask, $asset); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAssetTest'); + 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 updateEnvironmentTest() + { + $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/updateEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $response = $gapicClient->updateEnvironment($updateMask, $environment); + $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.dataplex.v1.DataplexService/UpdateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + $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 updateEnvironmentExceptionTest() + { + $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/updateEnvironmentTest'); + $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 + $updateMask = new FieldMask(); + $environment = new Environment(); + $environmentInfrastructureSpec = new InfrastructureSpec(); + $infrastructureSpecOsImage = new OsImageRuntime(); + $osImageImageVersion = 'osImageImageVersion-831593868'; + $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); + $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); + $environment->setInfrastructureSpec($environmentInfrastructureSpec); + $response = $gapicClient->updateEnvironment($updateMask, $environment); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + 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 updateLakeTest() + { + $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/updateLakeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new Lake(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateLakeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $lake = new Lake(); + $response = $gapicClient->updateLake($updateMask, $lake); + $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.dataplex.v1.DataplexService/UpdateLake', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getLake(); + $this->assertProtobufEquals($lake, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLakeTest'); + $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 updateLakeExceptionTest() + { + $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/updateLakeTest'); + $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 + $updateMask = new FieldMask(); + $lake = new Lake(); + $response = $gapicClient->updateLake($updateMask, $lake); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLakeTest'); + 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 updateTaskTest() + { + $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/updateTaskTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTaskTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $response = $gapicClient->updateTask($updateMask, $task); + $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.dataplex.v1.DataplexService/UpdateTask', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTaskTest'); + $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 updateTaskExceptionTest() + { + $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/updateTaskTest'); + $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 + $updateMask = new FieldMask(); + $task = new Task(); + $taskTriggerSpec = new TriggerSpec(); + $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; + $taskTriggerSpec->setType($triggerSpecType); + $task->setTriggerSpec($taskTriggerSpec); + $taskExecutionSpec = new ExecutionSpec(); + $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; + $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); + $task->setExecutionSpec($taskExecutionSpec); + $response = $gapicClient->updateTask($updateMask, $task); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTaskTest'); + 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 updateZoneTest() + { + $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/updateZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new Zone(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $response = $gapicClient->updateZone($updateMask, $zone); + $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.dataplex.v1.DataplexService/UpdateZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateZoneTest'); + $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 updateZoneExceptionTest() + { + $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/updateZoneTest'); + $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 + $updateMask = new FieldMask(); + $zone = new Zone(); + $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; + $zone->setType($zoneType); + $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); + $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; + $zoneResourceSpec->setLocationType($resourceSpecLocationType); + $zone->setResourceSpec($zoneResourceSpec); + $response = $gapicClient->updateZone($updateMask, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateZoneTest'); + 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php new file mode 100644 index 000000000000..75543bbbd4a9 --- /dev/null +++ b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php @@ -0,0 +1,1092 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MetadataServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MetadataServiceClient($options); + } + + /** @test */ + public function createEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $id = 'id3355'; + $etag = 'etag3123477'; + $asset = 'asset93121264'; + $dataPath = 'dataPath-363501670'; + $dataPathPattern = 'dataPathPattern-594427925'; + $catalogEntry = 'catalogEntry-1234004788'; + $uid = 'uid115792'; + $expectedResponse = new Entity(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setEtag($etag); + $expectedResponse->setAsset($asset); + $expectedResponse->setDataPath($dataPath); + $expectedResponse->setDataPathPattern($dataPathPattern); + $expectedResponse->setCatalogEntry($catalogEntry); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + $response = $gapicClient->createEntity($formattedParent, $entity); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntity(); + $this->assertProtobufEquals($entity, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + try { + $gapicClient->createEntity($formattedParent, $entity); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPartitionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $location = 'location1901043637'; + $etag = 'etag3123477'; + $expectedResponse = new Partition(); + $expectedResponse->setName($name); + $expectedResponse->setLocation($location); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $partition = new Partition(); + $partitionValues = []; + $partition->setValues($partitionValues); + $partitionLocation = 'partitionLocation-1757508417'; + $partition->setLocation($partitionLocation); + $response = $gapicClient->createPartition($formattedParent, $partition); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreatePartition', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPartition(); + $this->assertProtobufEquals($partition, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPartitionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $partition = new Partition(); + $partitionValues = []; + $partition->setValues($partitionValues); + $partitionLocation = 'partitionLocation-1757508417'; + $partition->setLocation($partitionLocation); + try { + $gapicClient->createPartition($formattedParent, $partition); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $etag = 'etag3123477'; + $gapicClient->deleteEntity($formattedName, $etag); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeleteEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $etag = 'etag3123477'; + try { + $gapicClient->deleteEntity($formattedName, $etag); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePartitionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + $gapicClient->deletePartition($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeletePartition', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePartitionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + try { + $gapicClient->deletePartition($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $id = 'id3355'; + $etag = 'etag3123477'; + $asset = 'asset93121264'; + $dataPath = 'dataPath-363501670'; + $dataPathPattern = 'dataPathPattern-594427925'; + $catalogEntry = 'catalogEntry-1234004788'; + $uid = 'uid115792'; + $expectedResponse = new Entity(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setEtag($etag); + $expectedResponse->setAsset($asset); + $expectedResponse->setDataPath($dataPath); + $expectedResponse->setDataPathPattern($dataPathPattern); + $expectedResponse->setCatalogEntry($catalogEntry); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $response = $gapicClient->getEntity($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + try { + $gapicClient->getEntity($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPartitionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $etag = 'etag3123477'; + $expectedResponse = new Partition(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + $response = $gapicClient->getPartition($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetPartition', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPartitionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); + try { + $gapicClient->getPartition($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntitiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entitiesElement = new Entity(); + $entities = [ + $entitiesElement, + ]; + $expectedResponse = new ListEntitiesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntities($entities); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $view = EntityView::ENTITY_VIEW_UNSPECIFIED; + $response = $gapicClient->listEntities($formattedParent, $view); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntities()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListEntities', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntitiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); + $view = EntityView::ENTITY_VIEW_UNSPECIFIED; + try { + $gapicClient->listEntities($formattedParent, $view); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPartitionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $partitionsElement = new Partition(); + $partitions = [ + $partitionsElement, + ]; + $expectedResponse = new ListPartitionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPartitions($partitions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + $response = $gapicClient->listPartitions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListPartitions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPartitionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); + try { + $gapicClient->listPartitions($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $id = 'id3355'; + $etag = 'etag3123477'; + $asset = 'asset93121264'; + $dataPath = 'dataPath-363501670'; + $dataPathPattern = 'dataPathPattern-594427925'; + $catalogEntry = 'catalogEntry-1234004788'; + $uid = 'uid115792'; + $expectedResponse = new Entity(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setEtag($etag); + $expectedResponse->setAsset($asset); + $expectedResponse->setDataPath($dataPath); + $expectedResponse->setDataPathPattern($dataPathPattern); + $expectedResponse->setCatalogEntry($catalogEntry); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + $response = $gapicClient->updateEntity($entity); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataplex.v1.MetadataService/UpdateEntity', $actualFuncCall); + $actualValue = $actualRequestObject->getEntity(); + $this->assertProtobufEquals($entity, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $entity = new Entity(); + $entityId = 'entityId-2102099874'; + $entity->setId($entityId); + $entityType = Type::TYPE_UNSPECIFIED; + $entity->setType($entityType); + $entityAsset = 'entityAsset1253969101'; + $entity->setAsset($entityAsset); + $entityDataPath = 'entityDataPath1530173426'; + $entity->setDataPath($entityDataPath); + $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; + $entity->setSystem($entitySystem); + $entityFormat = new StorageFormat(); + $formatMimeType = 'formatMimeType-1419746651'; + $entityFormat->setMimeType($formatMimeType); + $entity->setFormat($entityFormat); + $entitySchema = new Schema(); + $schemaUserManaged = false; + $entitySchema->setUserManaged($schemaUserManaged); + $entity->setSchema($entitySchema); + try { + $gapicClient->updateEntity($entity); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} From 697294a349ad8d98f5c98f44b412ffcc96cedf70 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 17 Nov 2023 22:01:08 +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 --- Dataplex/metadata/V1/Logs.php | Bin 7344 -> 7777 bytes .../V1/DataScanEvent/DataQualityResult.php | 142 + Dataplex/src/V1/GovernanceEvent/EventType.php | 21 + .../Google/Cloud/Dataplex/V1/Analyze.php | Bin 4126 -> 0 bytes .../Google/Cloud/Dataplex/V1/Content.php | Bin 4464 -> 0 bytes .../Google/Cloud/Dataplex/V1/DataProfile.php | Bin 3237 -> 0 bytes .../Google/Cloud/Dataplex/V1/DataQuality.php | Bin 4259 -> 0 bytes .../Google/Cloud/Dataplex/V1/DataTaxonomy.php | Bin 10492 -> 0 bytes .../Google/Cloud/Dataplex/V1/Datascans.php | Bin 7565 -> 0 bytes .../Google/Cloud/Dataplex/V1/Logs.php | Bin 7777 -> 0 bytes .../Google/Cloud/Dataplex/V1/Metadata.php | Bin 8224 -> 0 bytes .../Google/Cloud/Dataplex/V1/Processing.php | Bin 1353 -> 0 bytes .../Google/Cloud/Dataplex/V1/Resources.php | Bin 8775 -> 0 bytes .../Google/Cloud/Dataplex/V1/Security.php | 34 - .../Google/Cloud/Dataplex/V1/Service.php | 301 -- .../Google/Cloud/Dataplex/V1/Tasks.php | Bin 4969 -> 0 bytes .../src/Google/Cloud/Dataplex/V1/Action.php | 634 --- .../Cloud/Dataplex/V1/Action/Category.php | 71 - .../V1/Action/FailedSecurityPolicyApply.php | 77 - .../V1/Action/IncompatibleDataSchema.php | 218 - .../IncompatibleDataSchema/SchemaChange.php | 65 - .../Dataplex/V1/Action/InvalidDataFormat.php | 142 - .../V1/Action/InvalidDataOrganization.php | 36 - .../V1/Action/InvalidDataPartition.php | 70 - .../PartitionStructure.php | 64 - .../Cloud/Dataplex/V1/Action/MissingData.php | 36 - .../Dataplex/V1/Action/MissingResource.php | 36 - .../V1/Action/UnauthorizedResource.php | 38 - .../src/Google/Cloud/Dataplex/V1/Asset.php | 574 --- .../Cloud/Dataplex/V1/Asset/DiscoverySpec.php | 317 -- .../V1/Asset/DiscoverySpec/CsvOptions.php | 184 - .../V1/Asset/DiscoverySpec/JsonOptions.php | 112 - .../Dataplex/V1/Asset/DiscoveryStatus.php | 280 -- .../V1/Asset/DiscoveryStatus/State.php | 79 - .../V1/Asset/DiscoveryStatus/Stats.php | 172 - .../Cloud/Dataplex/V1/Asset/ResourceSpec.php | 154 - .../V1/Asset/ResourceSpec/AccessMode.php | 65 - .../Dataplex/V1/Asset/ResourceSpec/Type.php | 64 - .../Dataplex/V1/Asset/ResourceStatus.php | 182 - .../V1/Asset/ResourceStatus/State.php | 64 - .../Dataplex/V1/Asset/SecurityStatus.php | 153 - .../V1/Asset/SecurityStatus/State.php | 73 - .../Google/Cloud/Dataplex/V1/AssetStatus.php | 149 - .../Cloud/Dataplex/V1/CancelJobRequest.php | 86 - .../src/Google/Cloud/Dataplex/V1/Content.php | 428 -- .../Cloud/Dataplex/V1/Content/Notebook.php | 70 - .../V1/Content/Notebook/KernelType.php | 57 - .../Cloud/Dataplex/V1/Content/SqlScript.php | 70 - .../V1/Content/SqlScript/QueryEngine.php | 57 - .../Cloud/Dataplex/V1/CreateAssetRequest.php | 241 -- .../Dataplex/V1/CreateContentRequest.php | 170 - .../V1/CreateDataAttributeBindingRequest.php | 231 - .../V1/CreateDataAttributeRequest.php | 231 - .../Dataplex/V1/CreateDataScanRequest.php | 242 -- .../Dataplex/V1/CreateDataTaxonomyRequest.php | 236 - .../Cloud/Dataplex/V1/CreateEntityRequest.php | 170 - .../Dataplex/V1/CreateEnvironmentRequest.php | 231 - .../Cloud/Dataplex/V1/CreateLakeRequest.php | 246 -- .../Dataplex/V1/CreatePartitionRequest.php | 170 - .../Cloud/Dataplex/V1/CreateTaskRequest.php | 206 - .../Cloud/Dataplex/V1/CreateZoneRequest.php | 246 -- .../Cloud/Dataplex/V1/DataAccessSpec.php | 83 - .../Cloud/Dataplex/V1/DataAttribute.php | 530 --- .../Dataplex/V1/DataAttributeBinding.php | 492 --- .../Dataplex/V1/DataAttributeBinding/Path.php | 118 - .../Cloud/Dataplex/V1/DataProfileResult.php | 200 - .../PostScanActionsResult.php | 80 - .../BigQueryExportResult.php | 104 - .../BigQueryExportResult/State.php | 72 - .../Dataplex/V1/DataProfileResult/Profile.php | 70 - .../V1/DataProfileResult/Profile/Field.php | 210 - .../Profile/Field/ProfileInfo.php | 270 -- .../Field/ProfileInfo/DoubleFieldInfo.php | 262 -- .../Field/ProfileInfo/IntegerFieldInfo.php | 266 -- .../Field/ProfileInfo/StringFieldInfo.php | 138 - .../Profile/Field/ProfileInfo/TopNValue.php | 142 - .../Cloud/Dataplex/V1/DataProfileSpec.php | 281 -- .../V1/DataProfileSpec/PostScanActions.php | 84 - .../PostScanActions/BigQueryExport.php | 78 - .../V1/DataProfileSpec/SelectedFields.php | 90 - .../Dataplex/V1/DataQualityDimension.php | 76 - .../V1/DataQualityDimensionResult.php | 112 - .../Cloud/Dataplex/V1/DataQualityResult.php | 265 -- .../PostScanActionsResult.php | 80 - .../BigQueryExportResult.php | 104 - .../BigQueryExportResult/State.php | 72 - .../Cloud/Dataplex/V1/DataQualityRule.php | 584 --- .../V1/DataQualityRule/NonNullExpectation.php | 36 - .../V1/DataQualityRule/RangeExpectation.php | 204 - .../V1/DataQualityRule/RegexExpectation.php | 70 - .../RowConditionExpectation.php | 73 - .../V1/DataQualityRule/SetExpectation.php | 70 - .../StatisticRangeExpectation.php | 239 - .../ColumnStatistic.php | 71 - .../TableConditionExpectation.php | 73 - .../DataQualityRule/UniquenessExpectation.php | 36 - .../Dataplex/V1/DataQualityRuleResult.php | 317 -- .../Dataplex/V1/DataQualityScanRuleResult.php | 450 -- .../EvaluationType.php | 64 - .../V1/DataQualityScanRuleResult/Result.php | 64 - .../V1/DataQualityScanRuleResult/RuleType.php | 114 - .../Cloud/Dataplex/V1/DataQualitySpec.php | 215 - .../V1/DataQualitySpec/PostScanActions.php | 84 - .../PostScanActions/BigQueryExport.php | 78 - .../src/Google/Cloud/Dataplex/V1/DataScan.php | 676 --- .../Dataplex/V1/DataScan/ExecutionSpec.php | 136 - .../Dataplex/V1/DataScan/ExecutionStatus.php | 124 - .../Cloud/Dataplex/V1/DataScanEvent.php | 633 --- .../DataProfileAppliedConfigs.php | 150 - .../V1/DataScanEvent/DataProfileResult.php | 70 - .../DataQualityAppliedConfigs.php | 112 - .../V1/DataScanEvent/DataQualityResult.php | 292 -- .../DataScanEvent/PostScanActionsResult.php | 80 - .../BigQueryExportResult.php | 104 - .../BigQueryExportResult/State.php | 72 - .../Dataplex/V1/DataScanEvent/ScanType.php | 64 - .../Cloud/Dataplex/V1/DataScanEvent/Scope.php | 64 - .../Cloud/Dataplex/V1/DataScanEvent/State.php | 85 - .../Dataplex/V1/DataScanEvent/Trigger.php | 64 - .../Google/Cloud/Dataplex/V1/DataScanJob.php | 453 -- .../Cloud/Dataplex/V1/DataScanJob/State.php | 92 - .../Google/Cloud/Dataplex/V1/DataScanType.php | 61 - .../Google/Cloud/Dataplex/V1/DataSource.php | 123 - .../Google/Cloud/Dataplex/V1/DataTaxonomy.php | 415 -- .../Cloud/Dataplex/V1/DeleteAssetRequest.php | 86 - .../Dataplex/V1/DeleteContentRequest.php | 86 - .../V1/DeleteDataAttributeBindingRequest.php | 132 - .../V1/DeleteDataAttributeRequest.php | 124 - .../Dataplex/V1/DeleteDataScanRequest.php | 96 - .../Dataplex/V1/DeleteDataTaxonomyRequest.php | 124 - .../Cloud/Dataplex/V1/DeleteEntityRequest.php | 124 - .../Dataplex/V1/DeleteEnvironmentRequest.php | 86 - .../Cloud/Dataplex/V1/DeleteLakeRequest.php | 86 - .../Dataplex/V1/DeletePartitionRequest.php | 140 - .../Cloud/Dataplex/V1/DeleteTaskRequest.php | 86 - .../Cloud/Dataplex/V1/DeleteZoneRequest.php | 86 - .../Cloud/Dataplex/V1/DiscoveryEvent.php | 378 -- .../V1/DiscoveryEvent/ActionDetails.php | 74 - .../V1/DiscoveryEvent/ConfigDetails.php | 82 - .../V1/DiscoveryEvent/EntityDetails.php | 108 - .../Dataplex/V1/DiscoveryEvent/EntityType.php | 64 - .../Dataplex/V1/DiscoveryEvent/EventType.php | 99 - .../V1/DiscoveryEvent/PartitionDetails.php | 184 - .../src/Google/Cloud/Dataplex/V1/Entity.php | 785 ---- .../V1/Entity/CompatibilityStatus.php | 124 - .../CompatibilityStatus/Compatibility.php | 112 - .../Google/Cloud/Dataplex/V1/Entity/Type.php | 64 - .../Google/Cloud/Dataplex/V1/Environment.php | 518 --- .../Dataplex/V1/Environment/Endpoints.php | 104 - .../V1/Environment/InfrastructureSpec.php | 123 - .../InfrastructureSpec/ComputeResources.php | 146 - .../InfrastructureSpec/OsImageRuntime.php | 200 - .../Dataplex/V1/Environment/SessionSpec.php | 134 - .../Dataplex/V1/Environment/SessionStatus.php | 74 - .../Cloud/Dataplex/V1/GetAssetRequest.php | 86 - .../Cloud/Dataplex/V1/GetContentRequest.php | 120 - .../V1/GetContentRequest/ContentView.php | 66 - .../V1/GetDataAttributeBindingRequest.php | 86 - .../Dataplex/V1/GetDataAttributeRequest.php | 86 - .../Dataplex/V1/GetDataScanJobRequest.php | 130 - .../GetDataScanJobRequest/DataScanJobView.php | 64 - .../Cloud/Dataplex/V1/GetDataScanRequest.php | 130 - .../V1/GetDataScanRequest/DataScanView.php | 64 - .../Dataplex/V1/GetDataTaxonomyRequest.php | 86 - .../Cloud/Dataplex/V1/GetEntityRequest.php | 124 - .../V1/GetEntityRequest/EntityView.php | 71 - .../Dataplex/V1/GetEnvironmentRequest.php | 86 - .../Cloud/Dataplex/V1/GetJobRequest.php | 86 - .../Cloud/Dataplex/V1/GetLakeRequest.php | 86 - .../Cloud/Dataplex/V1/GetPartitionRequest.php | 96 - .../Cloud/Dataplex/V1/GetTaskRequest.php | 86 - .../Cloud/Dataplex/V1/GetZoneRequest.php | 86 - .../Cloud/Dataplex/V1/GovernanceEvent.php | 149 - .../Dataplex/V1/GovernanceEvent/Entity.php | 112 - .../V1/GovernanceEvent/Entity/EntityType.php | 64 - .../Dataplex/V1/GovernanceEvent/EventType.php | 155 - .../src/Google/Cloud/Dataplex/V1/Job.php | 483 --- .../Google/Cloud/Dataplex/V1/Job/Service.php | 55 - .../Google/Cloud/Dataplex/V1/Job/State.php | 90 - .../Google/Cloud/Dataplex/V1/Job/Trigger.php | 65 - .../src/Google/Cloud/Dataplex/V1/JobEvent.php | 394 -- .../Dataplex/V1/JobEvent/ExecutionTrigger.php | 65 - .../Cloud/Dataplex/V1/JobEvent/Service.php | 57 - .../Cloud/Dataplex/V1/JobEvent/State.php | 78 - .../Cloud/Dataplex/V1/JobEvent/Type.php | 64 - .../src/Google/Cloud/Dataplex/V1/Lake.php | 518 --- .../Cloud/Dataplex/V1/Lake/Metastore.php | 82 - .../Dataplex/V1/Lake/MetastoreStatus.php | 182 - .../V1/Lake/MetastoreStatus/State.php | 78 - .../Cloud/Dataplex/V1/ListActionsResponse.php | 105 - .../Dataplex/V1/ListAssetActionsRequest.php | 174 - .../Cloud/Dataplex/V1/ListAssetsRequest.php | 242 -- .../Cloud/Dataplex/V1/ListAssetsResponse.php | 105 - .../Cloud/Dataplex/V1/ListContentRequest.php | 232 - .../Cloud/Dataplex/V1/ListContentResponse.php | 105 - .../V1/ListDataAttributeBindingsRequest.php | 262 -- .../V1/ListDataAttributeBindingsResponse.php | 139 - .../Dataplex/V1/ListDataAttributesRequest.php | 246 -- .../V1/ListDataAttributesResponse.php | 139 - .../Dataplex/V1/ListDataScanJobsRequest.php | 266 -- .../Dataplex/V1/ListDataScanJobsResponse.php | 105 - .../Dataplex/V1/ListDataScansRequest.php | 256 -- .../Dataplex/V1/ListDataScansResponse.php | 139 - .../Dataplex/V1/ListDataTaxonomiesRequest.php | 251 -- .../V1/ListDataTaxonomiesResponse.php | 139 - .../Cloud/Dataplex/V1/ListEntitiesRequest.php | 270 -- .../V1/ListEntitiesRequest/EntityView.php | 65 - .../Dataplex/V1/ListEntitiesResponse.php | 105 - .../Dataplex/V1/ListEnvironmentsRequest.php | 246 -- .../Dataplex/V1/ListEnvironmentsResponse.php | 105 - .../Cloud/Dataplex/V1/ListJobsRequest.php | 174 - .../Cloud/Dataplex/V1/ListJobsResponse.php | 105 - .../Dataplex/V1/ListLakeActionsRequest.php | 174 - .../Cloud/Dataplex/V1/ListLakesRequest.php | 243 -- .../Cloud/Dataplex/V1/ListLakesResponse.php | 139 - .../Dataplex/V1/ListPartitionsRequest.php | 268 -- .../Dataplex/V1/ListPartitionsResponse.php | 105 - .../Cloud/Dataplex/V1/ListSessionsRequest.php | 236 - .../Dataplex/V1/ListSessionsResponse.php | 105 - .../Cloud/Dataplex/V1/ListTasksRequest.php | 238 - .../Cloud/Dataplex/V1/ListTasksResponse.php | 139 - .../Dataplex/V1/ListZoneActionsRequest.php | 174 - .../Cloud/Dataplex/V1/ListZonesRequest.php | 238 - .../Cloud/Dataplex/V1/ListZonesResponse.php | 105 - .../Cloud/Dataplex/V1/OperationMetadata.php | 307 -- .../Google/Cloud/Dataplex/V1/Partition.php | 202 - .../Cloud/Dataplex/V1/ResourceAccessSpec.php | 145 - .../Cloud/Dataplex/V1/RunDataScanRequest.php | 102 - .../Cloud/Dataplex/V1/RunDataScanResponse.php | 77 - .../Cloud/Dataplex/V1/RunTaskRequest.php | 200 - .../Cloud/Dataplex/V1/RunTaskResponse.php | 75 - .../Google/Cloud/Dataplex/V1/ScannedData.php | 75 - .../V1/ScannedData/IncrementalField.php | 142 - .../src/Google/Cloud/Dataplex/V1/Schema.php | 221 - .../Google/Cloud/Dataplex/V1/Schema/Mode.php | 71 - .../Dataplex/V1/Schema/PartitionField.php | 115 - .../Dataplex/V1/Schema/PartitionStyle.php | 59 - .../Cloud/Dataplex/V1/Schema/SchemaField.php | 218 - .../Google/Cloud/Dataplex/V1/Schema/Type.php | 156 - .../src/Google/Cloud/Dataplex/V1/Session.php | 183 - .../Google/Cloud/Dataplex/V1/SessionEvent.php | 332 -- .../Dataplex/V1/SessionEvent/EventType.php | 79 - .../Dataplex/V1/SessionEvent/QueryDetail.php | 250 -- .../V1/SessionEvent/QueryDetail/Engine.php | 64 - .../src/Google/Cloud/Dataplex/V1/State.php | 75 - .../Cloud/Dataplex/V1/StorageAccess.php | 71 - .../Dataplex/V1/StorageAccess/AccessMode.php | 64 - .../Cloud/Dataplex/V1/StorageFormat.php | 311 -- .../V1/StorageFormat/CompressionFormat.php | 64 - .../Dataplex/V1/StorageFormat/CsvOptions.php | 188 - .../Dataplex/V1/StorageFormat/Format.php | 134 - .../V1/StorageFormat/IcebergOptions.php | 74 - .../Dataplex/V1/StorageFormat/JsonOptions.php | 74 - .../Cloud/Dataplex/V1/StorageSystem.php | 61 - .../src/Google/Cloud/Dataplex/V1/Task.php | 544 --- .../Cloud/Dataplex/V1/Task/ExecutionSpec.php | 284 -- .../Dataplex/V1/Task/ExecutionStatus.php | 124 - .../Dataplex/V1/Task/InfrastructureSpec.php | 162 - .../BatchComputeResources.php | 116 - .../ContainerImageRuntime.php | 204 - .../V1/Task/InfrastructureSpec/VpcNetwork.php | 148 - .../Dataplex/V1/Task/NotebookTaskConfig.php | 206 - .../Dataplex/V1/Task/SparkTaskConfig.php | 373 -- .../Cloud/Dataplex/V1/Task/TriggerSpec.php | 262 -- .../Dataplex/V1/Task/TriggerSpec/Type.php | 64 - .../src/Google/Cloud/Dataplex/V1/Trigger.php | 108 - .../Cloud/Dataplex/V1/Trigger/OnDemand.php | 36 - .../Cloud/Dataplex/V1/Trigger/Schedule.php | 106 - .../Cloud/Dataplex/V1/UpdateAssetRequest.php | 179 - .../Dataplex/V1/UpdateContentRequest.php | 179 - .../V1/UpdateDataAttributeBindingRequest.php | 174 - .../V1/UpdateDataAttributeRequest.php | 174 - .../Dataplex/V1/UpdateDataScanRequest.php | 180 - .../Dataplex/V1/UpdateDataTaxonomyRequest.php | 174 - .../Cloud/Dataplex/V1/UpdateEntityRequest.php | 118 - .../Dataplex/V1/UpdateEnvironmentRequest.php | 179 - .../Cloud/Dataplex/V1/UpdateLakeRequest.php | 179 - .../Cloud/Dataplex/V1/UpdateTaskRequest.php | 179 - .../Cloud/Dataplex/V1/UpdateZoneRequest.php | 179 - .../src/Google/Cloud/Dataplex/V1/Zone.php | 510 --- .../Cloud/Dataplex/V1/Zone/DiscoverySpec.php | 317 -- .../V1/Zone/DiscoverySpec/CsvOptions.php | 184 - .../V1/Zone/DiscoverySpec/JsonOptions.php | 112 - .../Cloud/Dataplex/V1/Zone/ResourceSpec.php | 74 - .../V1/Zone/ResourceSpec/LocationType.php | 64 - .../Google/Cloud/Dataplex/V1/Zone/Type.php | 68 - .../ContentServiceClient/create_content.php | 85 - .../ContentServiceClient/delete_content.php | 75 - .../V1/ContentServiceClient/get_content.php | 77 - .../ContentServiceClient/get_iam_policy.php | 76 - .../V1/ContentServiceClient/get_location.php | 57 - .../V1/ContentServiceClient/list_content.php | 77 - .../ContentServiceClient/list_locations.php | 62 - .../ContentServiceClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 87 - .../ContentServiceClient/update_content.php | 80 - .../create_data_scan.php | 100 - .../delete_data_scan.php | 83 - .../DataScanServiceClient/get_data_scan.php | 74 - .../get_data_scan_job.php | 79 - .../DataScanServiceClient/get_iam_policy.php | 72 - .../V1/DataScanServiceClient/get_location.php | 57 - .../list_data_scan_jobs.php | 79 - .../DataScanServiceClient/list_data_scans.php | 79 - .../DataScanServiceClient/list_locations.php | 62 - .../DataScanServiceClient/run_data_scan.php | 76 - .../DataScanServiceClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_data_scan.php | 77 - .../create_data_attribute.php | 98 - .../create_data_attribute_binding.php | 96 - .../create_data_taxonomy.php | 95 - .../delete_data_attribute.php | 86 - .../delete_data_attribute_binding.php | 93 - .../delete_data_taxonomy.php | 86 - .../get_data_attribute.php | 77 - .../get_data_attribute_binding.php | 76 - .../get_data_taxonomy.php | 76 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_data_attribute_bindings.php | 77 - .../list_data_attributes.php | 81 - .../list_data_taxonomies.php | 78 - .../list_locations.php | 62 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_data_attribute.php | 74 - .../update_data_attribute_binding.php | 74 - .../update_data_taxonomy.php | 74 - .../V1/DataplexServiceClient/cancel_job.php | 76 - .../V1/DataplexServiceClient/create_asset.php | 106 - .../create_environment.php | 110 - .../V1/DataplexServiceClient/create_lake.php | 97 - .../V1/DataplexServiceClient/create_task.php | 113 - .../V1/DataplexServiceClient/create_zone.php | 113 - .../V1/DataplexServiceClient/delete_asset.php | 88 - .../delete_environment.php | 87 - .../V1/DataplexServiceClient/delete_lake.php | 82 - .../V1/DataplexServiceClient/delete_task.php | 81 - .../V1/DataplexServiceClient/delete_zone.php | 82 - .../V1/DataplexServiceClient/get_asset.php | 78 - .../DataplexServiceClient/get_environment.php | 77 - .../DataplexServiceClient/get_iam_policy.php | 72 - .../V1/DataplexServiceClient/get_job.php | 78 - .../V1/DataplexServiceClient/get_lake.php | 72 - .../V1/DataplexServiceClient/get_location.php | 57 - .../V1/DataplexServiceClient/get_task.php | 72 - .../V1/DataplexServiceClient/get_zone.php | 72 - .../list_asset_actions.php | 83 - .../V1/DataplexServiceClient/list_assets.php | 77 - .../list_environments.php | 77 - .../V1/DataplexServiceClient/list_jobs.php | 77 - .../list_lake_actions.php | 77 - .../V1/DataplexServiceClient/list_lakes.php | 78 - .../DataplexServiceClient/list_locations.php | 62 - .../DataplexServiceClient/list_sessions.php | 82 - .../V1/DataplexServiceClient/list_tasks.php | 77 - .../list_zone_actions.php | 77 - .../V1/DataplexServiceClient/list_zones.php | 77 - .../V1/DataplexServiceClient/run_task.php | 72 - .../DataplexServiceClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../V1/DataplexServiceClient/update_asset.php | 91 - .../update_environment.php | 93 - .../V1/DataplexServiceClient/update_lake.php | 74 - .../V1/DataplexServiceClient/update_task.php | 101 - .../V1/DataplexServiceClient/update_zone.php | 96 - .../MetadataServiceClient/create_entity.php | 158 - .../create_partition.php | 93 - .../MetadataServiceClient/delete_entity.php | 80 - .../delete_partition.php | 80 - .../V1/MetadataServiceClient/get_entity.php | 78 - .../MetadataServiceClient/get_iam_policy.php | 72 - .../V1/MetadataServiceClient/get_location.php | 57 - .../MetadataServiceClient/get_partition.php | 81 - .../MetadataServiceClient/list_entities.php | 81 - .../MetadataServiceClient/list_locations.php | 62 - .../MetadataServiceClient/list_partitions.php | 83 - .../MetadataServiceClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../MetadataServiceClient/update_entity.php | 151 - .../v1/src/V1/Client/ContentServiceClient.php | 531 --- .../src/V1/Client/DataScanServiceClient.php | 691 --- .../V1/Client/DataTaxonomyServiceClient.php | 900 ---- .../src/V1/Client/DataplexServiceClient.php | 1467 ------- .../src/V1/Client/MetadataServiceClient.php | 666 --- .../v1/src/V1/ContentServiceClient.php | 34 - .../v1/src/V1/DataScanServiceClient.php | 34 - .../v1/src/V1/DataTaxonomyServiceClient.php | 34 - .../v1/src/V1/DataplexServiceClient.php | 34 - .../V1/Gapic/ContentServiceGapicClient.php | 853 ---- .../V1/Gapic/DataScanServiceGapicClient.php | 1258 ------ .../Gapic/DataTaxonomyServiceGapicClient.php | 1768 -------- .../V1/Gapic/DataplexServiceGapicClient.php | 3045 ------------- .../V1/Gapic/MetadataServiceGapicClient.php | 1132 ----- .../v1/src/V1/MetadataServiceClient.php | 34 - .../Dataplex/v1/src/V1/gapic_metadata.json | 529 --- .../content_service_client_config.json | 106 - .../content_service_descriptor_config.php | 151 - .../content_service_rest_client_config.php | 442 -- .../data_scan_service_client_config.json | 87 - .../data_scan_service_descriptor_config.php | 221 - .../data_scan_service_rest_client_config.php | 389 -- .../data_taxonomy_service_client_config.json | 122 - ...ata_taxonomy_service_descriptor_config.php | 357 -- ...ta_taxonomy_service_rest_client_config.php | 486 --- .../dataplex_service_client_config.json | 246 -- .../dataplex_service_descriptor_config.php | 676 --- .../dataplex_service_rest_client_config.php | 701 --- .../metadata_service_client_config.json | 126 - .../metadata_service_descriptor_config.php | 211 - .../metadata_service_rest_client_config.php | 400 -- .../V1/Client/ContentServiceClientTest.php | 830 ---- .../V1/Client/DataScanServiceClientTest.php | 1250 ------ .../Client/DataTaxonomyServiceClientTest.php | 2183 ---------- .../V1/Client/DataplexServiceClientTest.php | 3840 ----------------- .../V1/Client/MetadataServiceClientTest.php | 1239 ------ .../Unit/V1/ContentServiceClientTest.php | 731 ---- .../Unit/V1/DataScanServiceClientTest.php | 1097 ----- .../Unit/V1/DataTaxonomyServiceClientTest.php | 1977 --------- .../Unit/V1/DataplexServiceClientTest.php | 3594 --------------- .../Unit/V1/MetadataServiceClientTest.php | 1092 ----- 422 files changed, 163 insertions(+), 87361 deletions(-) delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataTaxonomy.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Datascans.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Logs.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Processing.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Resources.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php delete mode 100644 owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/DataScanServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/DataTaxonomyServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/DataplexServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/ContentServiceGapicClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_client_config.json delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_descriptor_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php delete mode 100644 owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php diff --git a/Dataplex/metadata/V1/Logs.php b/Dataplex/metadata/V1/Logs.php index 2403e46a2b48ddb9f66eeb002f7c69b96aa3009f..c9f0c04655b5085838d6b04c76de7c9eca223a96 100644 GIT binary patch delta 349 zcmdmB`Os!V0~5ej`FZgW304JW4Q?af$%#TblOG82PCh5X zr4$U(;+j`dR4J6e#gm+$Q<@7?&IVTQ1yjzW=M0tw>zI5`#7@wZOV|Zw1w=HKRY8Qw Xiphde%7{wQGYTV-OCz(V0*DF%tp>9(4Tu2(m;;m13@EeX4sZbuLJ0~7 iUuAA|X>@rauMo4&5a0s>*a4HU6rhtS7CE!c7L*72*BZ0{ diff --git a/Dataplex/src/V1/DataScanEvent/DataQualityResult.php b/Dataplex/src/V1/DataScanEvent/DataQualityResult.php index 5066c538db5d..3ffe5d213dc2 100644 --- a/Dataplex/src/V1/DataScanEvent/DataQualityResult.php +++ b/Dataplex/src/V1/DataScanEvent/DataQualityResult.php @@ -36,6 +36,34 @@ class DataQualityResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field map dimension_passed = 3; */ private $dimension_passed; + /** + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field float score = 4; + */ + private $score = 0.0; + /** + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map dimension_score = 5; + */ + private $dimension_score; + /** + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map column_score = 6; + */ + private $column_score; /** * Constructor. @@ -52,6 +80,22 @@ class DataQualityResult extends \Google\Protobuf\Internal\Message * The key of the map is the name of the dimension. * The value is the bool value depicting whether the dimension result was * `pass` or not. + * @type float $score + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * @type array|\Google\Protobuf\Internal\MapField $dimension_score + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * @type array|\Google\Protobuf\Internal\MapField $column_score + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). * } */ public function __construct($data = NULL) { @@ -143,6 +187,104 @@ public function setDimensionPassed($var) return $this; } + /** + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * The table-level data quality score for the data scan job. + * The data quality score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map dimension_score = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDimensionScore() + { + return $this->dimension_score; + } + + /** + * The score of each dimension for data quality result. + * The key of the map is the name of the dimension. + * The value is the data quality score for the dimension. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map dimension_score = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDimensionScore($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->dimension_score = $arr; + + return $this; + } + + /** + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map column_score = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getColumnScore() + { + return $this->column_score; + } + + /** + * The score of each column scanned in the data scan job. + * The key of the map is the name of the column. + * The value is the data quality score for the column. + * The score ranges between [0, 100] (up to two decimal + * points). + * + * Generated from protobuf field map column_score = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setColumnScore($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->column_score = $arr; + + return $this; + } + } diff --git a/Dataplex/src/V1/GovernanceEvent/EventType.php b/Dataplex/src/V1/GovernanceEvent/EventType.php index a4c3bedd6eae..76dcc46e2ae1 100644 --- a/Dataplex/src/V1/GovernanceEvent/EventType.php +++ b/Dataplex/src/V1/GovernanceEvent/EventType.php @@ -91,6 +91,24 @@ class EventType * Generated from protobuf enum ACCESS_POLICY_UPDATE = 14; */ const ACCESS_POLICY_UPDATE = 14; + /** + * Number of resources matched with particular Query. + * + * Generated from protobuf enum GOVERNANCE_RULE_MATCHED_RESOURCES = 15; + */ + const GOVERNANCE_RULE_MATCHED_RESOURCES = 15; + /** + * Rule processing exceeds the allowed limit. + * + * Generated from protobuf enum GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; + */ + const GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; + /** + * Rule processing errors. + * + * Generated from protobuf enum GOVERNANCE_RULE_ERRORS = 17; + */ + const GOVERNANCE_RULE_ERRORS = 17; private static $valueToName = [ self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', @@ -106,6 +124,9 @@ class EventType self::BIGQUERY_POLICY_TAG_DELETE => 'BIGQUERY_POLICY_TAG_DELETE', self::BIGQUERY_POLICY_TAG_SET_IAM_POLICY => 'BIGQUERY_POLICY_TAG_SET_IAM_POLICY', self::ACCESS_POLICY_UPDATE => 'ACCESS_POLICY_UPDATE', + self::GOVERNANCE_RULE_MATCHED_RESOURCES => 'GOVERNANCE_RULE_MATCHED_RESOURCES', + self::GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS => 'GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS', + self::GOVERNANCE_RULE_ERRORS => 'GOVERNANCE_RULE_ERRORS', ]; public static function name($value) diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php deleted file mode 100644 index e8a5762450107149e31c37292482dd4b68965c7f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4126 zcmcgvL37ha6h?Lu$IlRg=oG~;MFd(xDe@#KEj5LXoj8dHnwTWC1LGNWEw2+1MG{)c zgJFE^p)qOZ|SAezrdvzenL-uyDP~iArq77G#4wo`+fV~+xNY<`}H^et`ArB zRqE1!gtV=OIr-XazK1^F(-V6dJPa6uX59^GfF?ATDYF9G551s)OUvaQ8m7VH zBXc+6Z8@FY(dVR%(c#^7J)mI}xOau!oS>h6HQy1fif=bpZ0fYDbeD8( zFDRD>UJXc&f^O3I>_$c%I-X|2!A9RYjp=fPDThaK0_e7lNfeTO|J_(|jJNLF@u5}P z?evURFpKBXsPY(JhredvlhM*w)#N%uq`8r#xzU|3&cqDFw@X1BS()?2xg*Jwg)CnA zQM^)U1@o@dj$;(hUp_b=CV`L(W`8>ag__&71JB*3Zm50*V_a~WqAPRx>dn`c>_3%{ z;c9BQ7qa0y*A-B0Q4?!CoJY{V@rW7rhKDfCmRkmj`>|EwfO9*vb zn5167X6d!5X?aMaarwm)7h!6jyfB9*xf11M@#hRoy}i9!gfqe|vr7Y>Lvb|_nT1@> zNSBz7-3mxxQ-&L5u~Z0!T!OQHFWkkf!-lqo$_fAa@d&A;`jei$PDZf zG4nvN#d$b;U|cOgc8~U?N9q|E?-D1XB3Suy=8jS=Kt3(9)jZ?^c_hVWP)PC^Rfcu) z91p48cBq-uTtQk`m`Pkpin5V3E*T^p&Qq7P5ZFQOn^-u4F!F^7lVU~j8k|Y?5}HxZ z!vw)wNLSWnu_{}<4f#|H>W7eby^yv%Z;uU*E6Xb{d+td8IC-{s3kpM(?YMZ9dv7Y; z(dz#O`umJpAuGL#zxpM|vqa0rvE&m6$sXkc_|q@ZLG!_}q5t}`zvm#gVal-E6J9_%_#QaeHxJlc^(ln zq%T4(k0KYs%wV;u0AM1R@-iCNtDDE~z4hGL68G0NMZFJ`NseidfpHP#79hFM;;xac%R7SzBMNuh-1S z>syW5QhlXfTb@3p=3#uRQQ3SjohkmRz+_^gx&ehfytPxu410cJ*X`r&N(hVx0=1)<47}I1W{|19h&%JeX`5n9^u z29IjIuH(BpDV2Wf?%=aEf!>7P;`Q{2^O<~R4!uhG)z-G&@gfx~<-4&DeSm)f%!f6z diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php deleted file mode 100644 index c316ae8fc52831b95a6b3dec76fed3bd41395806..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4464 zcmcIoO>Y}T7-o~SG?S);X=#Ir+Q|~pG^A_QZE10v!rE~nr}?m&q)3(}YrPpKOV_*G z-Eq>iid4ZLKtc$Kp5W3G9QY4hIKle;l_#i+RZv!H?}K$v9_L1o}Jj=$uhS2N^T3%U0h1ufTI8_bY zrf=db+H~Db8>da%ZEmDD3}SdTew5z6k~Uq3V25bjBmj=lz=3C&7|oY*OPCl;wldGP zD|x0}nU&g=`&VuOVA@6ypuDgGo&ZEYUbALfCJKl_=+}f5R4vCMmSJ0uDTWzTH|zjY z-K1>2>6pZF9mEt?91~AoLc%7Ko$y?Wc?N~?lo$<^f=ZEM@Eyah%;LcGEswZX)zat0BA6SY9G8uspE+_~eT(V#U{ zpI1P^1Et}p4qXRtoJPkE)x+S8( zqZ1j!%t6W()ZbCcspB^s{D@Rz-dVW}s=q1V&3Swnb&n*%1u(E};T;b7ROUul7>VxJ z5-!8yyie6d5q=DYWG>h^3$r7y!9j2=r>_?C zBMLkL2Ikfm7f1Rs-;aP((!?tEw=EOHr+r|!rTd`PKFAh9*`}$Z`%8VMeD>>~U-o^j zs5jYkc_P|+hPKD2*d#%EDs8)_xL?_C+Q#(RUbxg)1UG_g*wy7b>eU{MMEd*sDdB$F z6x$B`no`ix+%Kb`MX(DBeiRgZrDSv-y>zaz);xlU79P@5Q+pAX@_goYuhv=&?dzvy zK+~~t2KN;(+%i*M#!QP~$jsTWn4(e0Z*29cpd*<2kjLK(3*`@{u63)-K=12(9>U)h z01mniz8^-~L2q_a^C3d`DhS~#A^b-HCn>^cGlOb~k>2lg+gGGevzx)Iltu ztTI(zPJNgD=ZaeDC2@R| z^X!pCz>JoXdbby|?JdH;6fhLq8Q^q?HQDAdv5=X|9ZE}fWY0f@JzsO>>#&#GZC{s5 zS?cc3`nfin-7mVfMTi$<)9Ia^9f>Sjo{c8i5`QdQ_H2XHUB8jr0%LTqZp%ULq+BLS z>7-TvEJ? J?}0r4{sT;h^>Y9K diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php deleted file mode 100644 index 41e495fc657a3be83922ee88afbe70712691a923..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3237 zcmb_eYfmFp7~Wxk$_un`++CZACL^v{&~*sAU$BU#rG;%&=vpArG?`3iPRqpUoMGln z1vmU2{WbmuKN!FG158Xze9t-4(hDSD=$Fp9J@4&#FJF8Wokj4Gc|b!NJDhrE`_klR z)Qn=rnacvRopw4jHeJ?>{D8)mX;zQS!=q!fR;?d@h))xi#x5-&+zFAar^(i5!=j2aU?Nlsn=<>p()Z_5?($nnAQqw{`&Bz)2EQ z>@^e;yaf|~QQ8iC*G#y>@$Z?R*na49-wFJm(U@Jc;{*xC_tSSfY3OpFg{F9L6uNYM z!&I2!?z4!Y@w?_gCzQ$=`l3}2IgLXnXjN(A#(u=v5p(j@W2?#(FDHJ^RyXO1X)-q7xS4DtF*vi+my8?q+1PyXd*&c0VwDb$oruiq#i}N z7`~)9Cvms$j@zUGbun>e_>&X?e*jqH7Yzy%W{?gP+J5&urSYXrFCrH6q9$d% zzPkw%m{!H_z7c>mi6>1mUO;|)n;5Vh(NW#z%U zdKTWbKbB#2Bv{``OtK0Kf(y^H z;C2@9k8g((q`})lMREqkDJt5^3q=*;^6fxVMow~4X)64!8^65+xq-@cn9tZbgKoPk z>&NZ3BtMP6b1)~r$P&zoP^hSh6~BzA%*O?>>M@V1BqXPkey`oj#;oy3se>rg!wxh4 znuo>AM6o6W+fo_?HugcENli5J6!M;*a7lu_Gm(K8!@sJrR6V zB--dP?BaANvHOrVRwed`K;sP*CJYy$@A;t}(6GzTBqepZ=Ufc-M5E9J9h^Q6N?khG zmvk@!Sedkp6d;$~m4F%+EP^9I=s7W_KJEL0W})P`MixOw1!P^(MeR9HotR^}NHDE+ z6fDl23t235<45dm<5vA|VcN7XrA#JFGqz#jnvcscCkdZrEiP4oRNld*${p#H$`U|F zG&P*aFx&o}fhQA%UR4P47M@PDkU>dPo#cMh8*j5&5gKnDqjm024IbZgN+OsO1Dh&P z`IoKMy%ONgT3AgXMAlsL7;-ojC&(^U2j%YCKFrBG$U32 zBeDz&&6B;oTCIvp4VgT@U#@?H-!sUXT=VOCqk#*(62SX7#NTQ~Wo4v4U|Hm>q5ZI} zhOohq!+M)tc0JoWk)MtCV$_e?JEEbf&-Q#IAYMHm4udb$kUKIH3-|i&4fC+PsixK| HxB~bOBw-A( diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php deleted file mode 100644 index d0ba14beaf9d23fe0ce7a8b135f39c6639344cc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4259 zcmcInTW=dh6vlCGK2CF)CavR8v4oZ;qS$Jvpd?Kz$97r^n!0gPF0!;*ugA`|o89eR z(u68+yz)Ev9UvaynLof2NIXM<2PDp!S=(#JMlP4UWIc1{JGbwgnRDxobKt-m%3W@8 zSMzyYshueP0aqN?_HErZm0Hkfa97doL&q?=n^Ba)17+vIo>DB7_Fl)Mo*lS4Ussy8 z-86YtH|?OFt!uvKnEW_4}N-*(F=y1w4z zemjb^va%YgB{-v@tVkQz*UuQasrYWdquLe4<$mB=8^Ue^IBkDb`$R0~7}afqoAoVz zpdA^uyT0D>ssl3U=q?YFIP|GADXL(lqo&iY|W88{EI&1>#8yUVJH{>o zxb`!(VVFp`)EI6g^)z@k! z7kXt7mVX+9xoA{{9Gix52m1uCi+D}4djNIgkXs(sxtAIdX}U3#*@f0ItPQk)-EQSN zEjt<pD?^a2Pun!t@XdNw5sDqJOM#TnXa1*RFUQEL)wB&p&n!mvd zhGvKchvfJ05r8$H0+dfI`;d+})mv`ckZ2cf=w4>1Jhp*kW;zWaj#?*|FT;F4t!xTL z=}96x%<_w=u4YeV%szrSSF@U&dLY;7xnWzOW$Qy(MktwGg21lVLb&$|t5#v&vMp6a zGzv~sO0L}+9(>2Pb}%j7@D-TxxZh zSc40JWgt&1tfwyYx|3)Th3cU2@1iE!bl}%iAGTw^L7GNnDXwlKoVDCsn)LU+-tN~i_8KtHcMaWF=@_>t z0`(MWnUqFF1n_)IfM_oT((}O1)?oSyOm`O$I}hW+D*1Ah@k_snF7y-xHrg>!XR?cjw=AGwcb zk+JlmjArE~EDkK0zdgB?#Frr!x9XobeCwMSyo#gtz{G6L zMy@Y0la^zj-jqX6Yx=McvrW4*f#cj04&gMAJGG5^I9NNipL6?gsr7^lb)vYJK@+mV z9d-jJp~rYzdD-XT*QtQUI|Y{r3cpUXqWR#0_kczfLmH)PYbrO=6X)xG#yK8v^O`gr!}1& z*R-%#(zNAO?f&Y9c6<5m#xxA|ownD+6>ZCLwk%w3T28xFZW)2$TKI8!_bUBd4~)l- z?d9*L1wWhQ5V4W->dO07PvaH`|^W>}6j$Z4PhO1n6dV+=s$PR{2-)P^US(LC88uGqO^OpaE{MoxF!e)0VC6i!q*}XHVNYD4GuYOFcmTI zIIj4k+6;e2*XxiZpQDFcUg}{;A;Rr0a62o+LD`Ww;6`8NMlRQjGA5Pg4~0s~hb*Wa zs3*4&5lf3e6pa}aKN>|xqcW&g&?r&UyrL@=`p9$r61ph!%lv`V`Xx~Da>v*c zXryhn@;N$m1cs{D&}7rYuocwF!ub(+GPzJFu}PQWfeT78xXgfly-$HXfiUhI*CRe z;yqRi^%xr4HLNyf`K{!xE0y3g{hf@pxeE|@fSZ9|e!@TPmo2BsM5p{jeB7tV=9{94 z!J1TFZn$-`wO{<{I66j>p^JFc#SYM1p`fYFpjXIPvT^gIcAzF4{RM>09SNH+Q`o%P z8#Xf5ByMh@3D@vIqad|_K|(snpYmMKp1(n$w~9^+VXGU>CieZh@8V{@1uIW3%y$n% zY_mEYv<_n!?pM$Wije4Jm`*m^eKLxk&WQ$v{!f(8^!Jsl5Ni#Ce$gWCmnFjmFXR`L z7=Ic^r#pyIHSHE`?`pM!AJ-^9N@zY4J;WSeK$fh=SW@YO2%#rDyj8dMc1$0DU znc{b%Iu6WvrjOnElBy#lYvbo_AnD+|T0vv35p4VU#{+R(c)tc?DMt#m8X6^ksV6&d z0Q*KR=4kFPjt)wl_klV;QU-+I_Xc5*)H|MwBwZSe8H6^~(?}I{ta}*FhZs&z#lI_P zYKis^gi?ZoZ{c^^&~>V>p>ZagyivIfxqPl)K+|F)^EuY!o^y|HcItVqSOGuz5#g0B zOAfetjPO!!dAw=4)Em3PKT_}yB;h3pEuCi6&$4bn`jrI3K`qQ;>VDQd!`?q7dnm? zP~o#=Pu;?G9}exbw6qIT)N=^Y?*r!{wrO1_Xid~pXnfPO;2=&5#lJj*jyPTmd-cX% zq?s&!sGvfc*S-rUWvt#r$D{CpfS`z^v&>iwaPqi~9|!e_rxcxl+cRw&2+`a&8Wyfg zphF;_Zp8;^Y8hKNz%RH=M6_t{DmkJQ{|Pw=xhdH$O80tUWHw z%jhee&pAVDGrcJ)-R#fNPawXKqjI2#?{Fkd`psB6tltryzKzato+f-wwCGTg%q?c| zHxa7JsU=m1tM}*1)}KY#8g-nr^%iHVAzBZ?*33mYG+!-L2>B{q6A&A!Txpd3pMs`S zD9bl!vFs4r>LoPQNy~b;$4B?qb#yk}j?=i5mBp-s=uhUS5P1rjW04<@)7^t%+S&eFUJ`k3nX#Y0HP0g)+m0eAWiIX5}JG+$@(F%^0`v}S5WUB&U5CkqI2mm6bdk4 z=?<*}@1p4x9eD9YO^QNp;m7CEspUv_y^iSxrTW7hQbVy2y{+2gmLqA+C8cm)@HukN zS(5kN&`!Pgw|{+*TPiM)Uw59crv8RJY|KS2spjIBQx?P*IZMHJ7H-iLP*{q?Nr_xoc1cJ4s%~ySkq{=y zVzT)*yHzDei%d!Qhl11)oLQ2Pw9c3Wo5JAQ9D~6?Q6K2^%KE83ht9-rmgx^8YD#_o z2%!m;;DJG}-V5SMYZ2Nt0rBLeaoQlJK*c2%v3dyLAL#t_tNvO+$74q`_3Pc;iJ6K3 zGM-I}dWXx0DU$kWF7@cZ^-f*v?t3UP@hwS&(MM{2&v>?8d@ZZg#24}_U3!-T{Tor~ zF+@8ldLX7jiLa>`UG8#em;&10Lh?eHiF?;8dEG~4Ox_<@@*XU#g(8)Rr>|PYUG~c$ zT3vHmOy8k9Wo&@-{TB`cp+Lob>6O0jqcWziO_{Se$Dr4bIdRuWnhvFM&(h9qqLEX3 z+{X&tN_ZmT?LpKYW4ZKwi)BMSJP|_${Iilg^a?e(-d#<4chQ9byT9U{j);b+ulhj_ zol229wZ|rtVlK+mM-qR*TaV(+{*st%HzL1>RAP5B2XMKNs)%tVB<)x+{(EAI^nD0v zNfEJLX-P59n3i9%wESS7y!=~%7GB=_NxJsR zONx2MygZ>O*XI~o`k}mg9uB2te~EN#GR{mLTWBrf>_Mi4dclF0%hnnTUmcb#p?LjH zK_}u$q+ZRgS|Xmz*Hy*)9We}D!os(o>hvI;@-zQm_0o0_xPGNve)Q-O4@&+XW3+>9 z_I}?Lcrzo|biAGF4tfb*D(M=2^&2tmk5l5E4)WXILIB1oyI|z2y7?9Rtiw^-y>C48fu!TQJZOT>3NP4yh#xujr z$ly?}N^MpCf}C>5F~@9@dk(pzYM0!S8<(W=aoOV@b4tIj(TruuW7tDD7)jIJ@7Mi) z-LL!2-TU^o4Hwk~ViHI5NLy|0sopkGZO8JgmSw2T&gLd@)Rwhl>jrVMs#;lAmzLMm zYGrZl0;;-J$7zv*x@B2g2FbMytJBW4HBYk*@-nwO$3D9)&2+QOD1fQ$5ZBgPL|v$t z9uZHY(i;m*f1^zGH!4DZ@Tu1bGncHkAL_|NV%4ZWqhp620ymvpzGo4TiK zhW<13%B4M;uc# zHY&tzIlApxP8~%Hg)QRw0i?goTo%hxbNZ$_!!Z^LJs|I?p3@=0)m7CYUdJ)-Fx=F@ zzW-_Cka!hseWPfa7L9^sx`jg5r>=>9ie*D5rguD@d7T*T64};vb;~)P>IxBLi43xb z4U8GMBb!LZ=!+k2=5YtP;_bbQ8AQ?|uB)3{?_x#9(MH4c6Cg|$g!`XZb`FLO&Ejh=*0-9HCSb59OibKje|!K|%=$8FpX7ldRzanLo#1y6g}< z`{?tQOCeEXRg>?Pl?S%+Vv?!4AT{2 zkY1QKV3;-rBG@x5*cni1ENCZjFxJw`%->_6ED%qAmtMc6Ii&`}yE=KnT%F9{mag_> zdbW2>enZT`8^=8>{8wQsc>D^~a6%rPX@1yg0vDtxTOz5-?IK zt}d3RV#+uS&#%{NQ;_*824`!!>$~VmAK!tYKY)a-ZIOnH%@Xrlrb- z+>0q^U=+_>Y=9W)5?p#3#x18!oJMmmH6nQ$%k0DS0lcn_y$Mln0MPwpdEw$t$D?r( zQJpf$ORo`tMzbn`sFEEMv$wUaH4TDz<1>j&4V0CRDdR4K^_GOlEW(+PHQ`Dg;!mw6 zV{0=1VSk!P7!R#x<~z*M0B!Im3GQ}?{8t$HKZJ`kScAxq7L=6`Vej`xa_GuFXVFxb zwh!S{05@Z92Hx*7_u+CWGJAg&gL6SP;6gruZyhMHk+WX;Uih1FAk_;^Z16ppq~T{= zZ9GNLg0Io`x-Vrje*hSl!BtL&_8kj(T$zG+2g^R=H_fuRl7eJgOdQyu1(TAV6}oF1 z+FpazPI?}Q)GWiOp*4x&Vq(%X%l0RRM3b#Cg{tW}dpy6d!w4N+NNN-fPv$@9Z)25; zakzM9wAg{#pl5Ar3{{i)-ZR5*-+V1`(lD*@Xj(U6m~K)k!Nf21$H#nRlPXhVB5hN*x#j77&yC7Hqeu?#Xz9uO=E-kwcT zC(+Dg{-dMKtf4elorlvjDh<)=asS#3&gH>IOPdvHRLcJQ31^A@*5qS&c(4PmDa zXF_TBMNT!{n;XC%~N{ym5((xOBrEPfNoq5v1NnBIYj(7q}+Va#*%tt~w9 zxYY~&ajtPe&V{ou!rIUjjX2B3kq0MA6OhzR%!?gtC^aMfix`~huE(|=8_sD1v&i*m zxoKeHIUY|Tn$`nT2*I8Ss1mcy73rBgP%(WCl7XyOk`RAJ_L##7WdcU9-R$uGAW;~) z6)Uv9E&lZAo=mxm`|^~uJU91BeA>_XU32c0{J5W^w4gmV3d)cBrBN8B8Ce>KQNFL4 ze~v=3B1G~0h*mbQ0|a77ThM`_;HfhQ<9_sx3_Dl3FN-9N_GJDDI#X}ag>0Z;o`o@- zWL<2>Se<2*i6a|${?qz-%>4iS`^bNuY9|zFOr{#$n$&TNfHWraR#qmFxBpL-AoCnX z*ybqHaC&vExK=&TqbFf(WqoOBacKd&^a)5{D_^eG=+~j{*BZ9-ar$+2yQaTOjTN4MTQs9}dkgQ9SvlIq6m8r?brC^g9quD?aDs-pzH^uW@>nc0B=pf(y zgk$;Z;`v}3=Pxa- z10(;De*Ojh3=i~!{0vJ*^iyY>nVaRC8P&NrMRuR?x;P8d{GNv2_~1=`mR(mWr+atp z*D**2<|O5+h<4TP{iWdo!aCOGdZ|7pyn0`*rvG_2;|) zb^k>luFD11V}pjn+H&(qc3v>KKd>CDWp(A|@bHigVfTJ<~B8UGoQ& z{(*eh=-LbkkMBJk_F9f<^<*Nb^jd7|V_EQ|y*K(6YWqO;gsGANQ2B#m&tZdJqkE8N zc57hv9cxgRyZpKf)GF_u7?Y3{D zUBu6puNCQd6MpjrTweeb9ALWbfsV2N?vuzIl%C~w%e|50&>X@r@uR%0%Akz z4-tsvO}k~iVuK^~73(?D2CSlzcB8`*0XeW0p@nYaJ7$>e#FDr0gVo~;LB0@&Fani1 zv}KvEoQHLi)96|)ZtFydFMk8e&QYHw0Dr|Yne;rx(vvc!xnwn@lpexL%jzAPox~>c zh-U6A%p=Fi^5}ME*M4}0IH9_xbCfv$j+|6ZHsVxaRtT!Z1rf@Q!Q}Xu#Sf9{adJcfHVjx1lw()|4Xv5uwg`MD)M$uhHXpzBD@)m4N zElE)be#eenAgx2_Riis(0!BMacLT{LtWQ`|iut!9z^Ax~A>_p}w-=UFa3#nje;t7M zw3Vf^<98;G8XYZQ?j21SKi$#NRk&bdwCJ+7G2sq2x=C;=lDq=z6IUj!x$1I>Qhy3S zWCZ;rTu`5=<(g4@R#lC9S+AO;rFGn zwR$zr*Mehfd9|d{zGdk=oUJMv5*I6FpFA|V>~UC`T=tl(rWAmY`K8Nn(G_Qg+z|-X zlx#^wv7@lMTP&%%T8l4bBe2>Qo|^hg2*Qu7=A7V!m-aKOIf_kb01VIr$Dl};psR~! zk{)WjFq!t_xbz8xS+6a2Q|LN*_ZJYNyvBGqi)FSv#>XOa+LJh~(|(GfnBxW}vlA>Jl4hv_u3MM5HpDWv^Ll zNYTqc5j!0=NJKgB6Wq<$PxWYPf;5GiaY;8JKKsITMA&1z@HGfyDWzsBmB;a=R2@RX zR0u)6h7g@X_&P-NdM>A`c?4>J0KcmsTnOCwDW{ZkYKeXZ2}nw|qH#c{K7&h7l;EMWG&DFVE)U;xuplVa{Z9uf9=#LHG4RJxM zmkmwbud6y@I`!uetm&9p(av+gj3^o61&z>*YTAN=)E(%6Lo=te_h%aZuup%OH>bI+~QJ_Mx*TDW^4ulH;0vHa} zd2h|yQ~btYs``b12;wII{TLHopFKSDt3V+6_W;?H$~@_|&yhnWd;LF(3|IYfTGXPA zzGp$w{>h~Z&iEvfKNb*ppwAFPVOhyWd0Ht~_PjbL4inU_sx_tH=@gy!-Q~U}eFQ0=`xrgeBxBZ#uS*Ho zR4^Cm`jkOq(vRR;q4Gr4%9M}{tzJ@%J*Ad=sOB*fh>OtU8`2isnBJzVik5q5l!|-B znxQ_WOsB`=5>|cFJ5^1qXnOoCRY@3N30bLsOR%2Dj!SPf-0XtMo`)LIC%a*Cx?I|Z zXluZ*LJ<|v8it{hE1>^xedXmg3YI74wh2|!q%^NN?tAqa#nV{k)A@cn#lS1lyv~=> zRYcl^HM`GR2F5(f+B{E1q;Fu=E0d^#ieViJ+G4{Q8lF^3%D zR3X7oi0DblZBkeIRTZQ-M8PbD>D*)a{SZe<*byJTJIj4R>a%Q)G95{2h_2mE{FQ=l zG@~qPvoUd%e!pw7wrE1_hXKhu!xh^<<8P-p!b8c*mJn+29v*A78@rFJ!2!a(0v-mh;dC= zdI9k^HbXsvu;G3Q^2WcssN^Kz#JM=2aXD7`QJCKbM_7mxt_O?{ftI90*ccrwK7{zW zd+*^~oemPm{uI`5SUY^#!%L#mSNI{1PJc*_a~qwIyaSsv6`nud2=npA=Wx!a8?ifK zDze1MG7z5@;jJ`%xHJZ%Nf=|kit{;y+3Og6h7)TSRZEy&Bmx?`C=P^-hVU?6w}quE zaNf1+)Mu*5!pVJc;!MXm-HFM6F2VVkULp9TiD^dPAGg`TlBVPvQKBt z4(~5i&f4|Ne*|E2)(5HMr5QRqmU;UA&mN5pyo|(WQmNh3cgffm>yL}oD)q>zB82^< ziG`ky{qwA`QXJN(Gd8d_rr8V@jNZzAT`A#+3A>KwTSTIBsoCId`$QMNG}grjC%gD% z>f*ieRVei}ta`ZRbJgw$}}Lrre3GA3o9@b@=FwwCr_F#tCv{Fhqioym+AT1k*nCl>J3QGNJWx@x@q}s5{+#o(Gwg@K?8o#t@ zDDGBdV#lk z2K6H2iy`SlxJ(1HqFyWJjN@mm&<3}+o5^;SdW?Fxh~0mgTAFe0;nW^ZlP7N&*{M&I zQk`o!D{7$YR&hRtilF}JmP(z>% diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php deleted file mode 100644 index 34530b97c352dfb6feb2dfb6c8ccd8ed5f91f029..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8224 zcmcIpO>7&-70!|pB|TcydX&fv6F8f-TRVb7#*E`6a-3jEu4LNcPe@9s4593b97*d? zT!y=pqZqpM)>8`vz4TC^KPXW2TC|t;-lPQzw5R$|YJI}<&qL<+D>%g zYUjN-@Be)>`_6lv{SI7E)@Yk{4TmBBr%I=5Iab4JDLcL0UD{O|)%v2W*G_U+B9Hvk$f!?qQV5*~npf1Tb=%WNpNV>tM8(X{Jk z+jLB$WqyKI+*EdrmQ9iQB<*gm-Ed5+tuTgCyFo9%q6nFc_F~6Et8XfvLS^O%bi#JN z?a*%9Xl>`H-RPPf$Lf}mbY*3aI==hZo6E1b+cI(Hu5wxExUzCW$(xGP?a|=wiqfS{ zuiL)C^=1N&{ip3y+@*EQZLQt5m=~pIk3 zdcj@dWri7>qReGOg8fCu^NS!*e=5OZwo9=G=xxVzjwG@4{k^w&?Iq*IGf+~q0K$4En7jbz z^kOYv+p2Ho^$+SB#cEm4=2!E2PJV^}L~2@QU9ZX#IRmq+d3@AsRXLYD>C;T7HzF2Kv9T7u7yWfSZQ({YJ)xO=cP94a^G-(=8H z*g6BK@%g?wnA8nqZCQJDY?)6RZhn(OZ*7u`zcD2I>h$P zLt1ACA{$*QphPsCc@mQc-5@O3g4rE&4{;lYn$^$OCpvKx<_An-h`pB_L&{#@&vEJ#M5*`>`#DZ|cp~+HKOG&bKMTQ}-yF$_Hjf=` zqBg$-5yZ2IqtO>(%qp*@<1p*#<+d|##TyJ_REoi{@~QNt_CslsxpMCta7L;>deFt* z7&=yeKZA&ar#->u-Lq-8eqgk*Pc%71=IIb38Uu)UkP$A3rmu`nb|EY&e#AkOA%9W? z+26MA3JY`OmwKcyKZpT&1z70Ivz;T%U*_&u`Z2^+85^rQDe+$kq5+-RTnL;KkR&ub z!TiFI$Xo8jV0dZl#BiO%CkB^^oCj9ZQ+>>=aXAY}%==RyB*4A+_#sJr4`PF!JZf;`X2D|)t6$;mPHw#YzuQ(c8A=6%-v3Z>j|_rqgPMSp)IU%>+r zKLjx@b|yl5_*z-VZE|uL<@CMI6Og*(pDkPL3%o0R{wPvOm$oajx?e1~37ENEDR9IfH4a!TH09jvM1c`Y1ZCFjSy~n$(3xp9O z?^C0REx2plXRX#hmZ9UCv}GQc?2PU^P9g-RKk8YI=pRB#;vz%?294M&@fySiH6@5c zy-VJ@Ki9-{5$llZZzPC_U}7A}YN=AtYC{kJ3lJ0e{SCb)>RH>YlraBiAY7_sv6}HA zTiukKtg3ETOGTMttxaRWuIcih*x`3t+sNfh@@M>cGoRB-^5+tk`&3Q;PEG!^gw;D+ zTXl=`FPy4WyQNp;f6ri*&1@9!6iXiz<^Rm6>u~l&5)u{8vl6Q4)ha8sQ*A)i*6!xZ zq77y6DJ_RHb1-9xR8xN<`DG_?C(&UFu~L)c)z}2-E7+3a$7|?eH3QIp#qL|QY!(%* zpVDkt)5A`aWo|~F7qlXJFeitW5snYQd<<%$S}Rp>xnA9>*7U+q#LgljTrX|puk;T6PmH+@*N9KeS7%pu{jiw2kbNN~lyzI>?73kg>QG9RJy>t9G@x&C6?Bm)!^8qr6y%g3G>ssnFUDXV2aX^s z{Y$=w8ao$YgCY8FQQ(r1WeUlZ3+zZe`r%0l7oIzWnmbBys0+ z?c9i)+`nnbeaGq8E2-4|`}f__@xOo>J!fBh2Y(gsGaZJ5GbX%<*mz`-W#+v}S!NBk zEZu!ev_0>$8GcyXv-+RaaW9;1o_3v`8~w+f2=CFaU-Ca)UJ;*}17D>_ev#&s;>+fgc5N+C~Boh$S7eWPSDTt;B9JNTON=d7j^y>hLNW}qJiZ=GdS>fzj>vcsz z{Y^;R`7iw)oLH}&q@s<~T;e$M-n@DHX5a5eqX?dpBjhNlLZ1xIi5ek^q)@^WAsHmY zAxh$jal}HDHX-c}`P4Zj2kn#7XBrxdM0(gDfe=B6buSc&U-zk^QHbB`XIphmXj<+b83Ol1O5nD00{6?-E`S%(I40dG5&Q(AKT$FWnMYzp zmHv9c;y&X{F&eTTdXgp?(lAC1zg{~`xTl!lBn5Q1hqXtTOIN9P5@e><`n>7>Skbck^w# z!eF1w;3jg~f+jrp|E+ZoiZk+Z`cvm$s_J5DhgE?k)aSKiytxaIj@p-$2k3l*$9l-Q zTAcf{JHRYuxA1i*OV8xgwMBuL-9OqleFaU-j0U^2$H7XJ?)BS^X@*~CyLe@F=dP`( L%$Dl{E&%=kPEx~dp#2a11ATE{{n|_?lc%2D1wc?2l5(AyPU{DgTI~67&e?Nc{_6A2 zeh03L>!eLA)gijLb0j+ZMC@3mV`^qg-0AM_5=+#~gO1T6R$3Gb6|r1th;pIW_y|dD zvukN2EAE-*UW=@1Ewihy>Z+r5TIAL0;oVh>@GW+lfdaJE17denjfm^j+$M2Ux_f(_ z(QoG|{dU2n-+p@cA%NCWZCk8)IPeXK_^;F5X&IVmJF0^pHw;@b+Jb<$qbgMes$sj>c8JwhTiXRr1N!0^6kJMA@=v2Ns3SG1q)Z#mkHVm`?M?L7AP0LQ;&S!?J zZ%NmE^{$~2uJ{U}>bVJj`3zP@wLT%iccz)0rae1NAKpzayBKQ6@NJfxZ1Sr6h#4@N z!m94d?moYE^10&)$Ty^Zn1Hd8`jQA47^CK&2#KMUsoae>Qsf8eDqQjT;6TWNoko{i zWi-n$ts8cyr5-7aHq2-vZ={eAhe+4Z6A^DEBHV|VW)XB{h4PRX!zZy!GR<*0Hz+{b zKY<+LFsg0`nQ*D1qfvbh<1KZEwCu#V7{S-v_Fi*JxoIj0{zo^J0YP}aJ3Vvm7*d_IUocT)ztHs^2?;yw=^%05F$ zpO4bdN&qhT5ls0k3YTHRmEN^3s^aALA(->`a9SbnDVJK|Z07#OUY({WM3{pKbYffG zBMD}Z!YagqHbiZ5pyi?QPLj6XG11SNold1n5ar+tFkf#-4OwZH>s2{lTr0|j_y@uy zjFl^8IUW+GAX<~9!d5&iOv7ZeT96vW@_IZ%AIP;@r4}Dc-ho)a;)EDPUXmlO8({{b zhia?q@}3Pp2xXtWl^R1l@jeEC7esUH)oE%&3^J4$-QqJ=sj(QDOTgT(gPRwG8J->6n-cj}*1jX&o8uJ#QyHglOu! z7>s>owl5rg7|s7e^r3?M=+Wm>7;}y~goT{h%=Pn~igDAxt-0|xQuvJ&6^by65neM7 ziFKsd9iq9R<&z;G1&^qXG(1MF!;DvOaU>pIel`Tjs{=fsFow(iU}rEpy+E)_{xt;C zL0sV(%y=%MFjevR^WXx!rAw~61@)Jz!E|t4_z;#$l{|)oN?B=aRZoVId6=nVv?$3+ zO+fCQM9HNjuw$gd~u)@jt8|yIr!ZzDJCQs(W zl-!T`1p@SeF2SU&?GwG*A_+iC;L>e;kbDi$V}K^~eWL2bQY`apo2ek6&;aJAr9n*0nL?$ZF{+r z<}aN%m<30yFtH@%H7_;9soYOl%`3vy^J-p~Wz;K8pIBOsUMV9D72Pc)hgR22(f1+B z(kiPor*a=N_O8K)=dwq0u&{^`8+%m6i)S{5ee`+Z30yMTSXmgl!k+J%)`99Umx*OE zLv>!{v;~A-W0V^o2+tvb0S5bTEHkJ-FkI@42WldQ%86wL#0&QJcMw0j3YoYG^G&8BWYFxB&^x<#dx1Q6>?kg!QtE;$^kO zEJOPFP{v#&F9RXkQ&{M>)vmK|T69LB_>glW%GwN22XJ@b%C3rysji$^k0llue0C_u zYYe3B)^t@?(n++UL*9P_%Y6rBT6=2Sc+E=B#3FmafDrGS0W(di+)98R!}vUQ30%>h zT**bae3rb)+pv5tqcm1Px9*73F*-T;R8K2E-nmc5kVWl=dw3}g zgwv~-;ICDsTBFEnw0fh~%r}~~lagJ6xqPKuFV-7!xuJY1Z`DyaT-+!=m6dv93oAIb z7*5VWED$-8%dixXIB4ssU6}MUTLLa)l_;-QYFj5d%_X>0lk1gcEiWsZQdwG;H<1PY z_PUIjyx7=Ms+CePPg_s{X0ZX4ltQtduRN7&Tk%NtPvN)HAHqY^ocvCCUS(+=Gd=%u zEY#i!CRi@4p2Ae$114)&kxlw}eCidn?7~_C!=9b`b^)Ri%dPkNW@IBK_3?=z z*?>-riT|VbsT(IdM4e@iL8+M@OWI2ey%wGUoh7042Ww?%)Um5_b6qEV>9Bl=bW{d3~hCEw4S8NzlUJ9 zpXUpV=r=xzHLn{ZS?p0xf`k_;yEG;qmO(bXMm0BCv&||8vH!3wO2$Wni|D{Z8 z0&M+r#q}pmO#BM11M0XMMqh#+wD1#HlJa@EURSU(J6Y!dj2DVEIZwfGP{0cg926w~ ziIKwB0E-|Ojuidm?<-OWH(=>NZR7OcKLA4~ZR{P7_$;4A;S@I40|)wnc;XN4!^!U= zFxLyiT{5qn4--}p;^LFR|v0(V#TsjtyR{so~~o2KwGa$%{o4e z&^`rAW(k{?LOgoG!CTgOEB$WRn5O!^OW51bhlr2jN%;o$Cn!6Lm&aQwb~DB9sS0vQ zcJHaMi=q2)KwXocG|~AB@v+% BwORlG diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php deleted file mode 100644 index ca7d63a45e79..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' -µ -\'google/cloud/dataplex/v1/security.protogoogle.cloud.dataplex.v1"U -ResourceAccessSpec -readers ( BàA -writers ( BàA -owners ( BàA"& -DataAccessSpec -readers ( BàABi -com.google.cloud.dataplex.v1B SecurityProtoPZ8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php deleted file mode 100644 index a5512d8018dc..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php +++ /dev/null @@ -1,301 +0,0 @@ -internalAddGeneratedFile( - ' -•b -&google/cloud/dataplex/v1/service.protogoogle.cloud.dataplex.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/dataplex/v1/analyze.proto(google/cloud/dataplex/v1/resources.proto$google/cloud/dataplex/v1/tasks.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"³ -CreateLakeRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location -lake_id ( BàA1 -lake ( 2.google.cloud.dataplex.v1.LakeBàA - validate_only (BàA"˜ -UpdateLakeRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA1 -lake ( 2.google.cloud.dataplex.v1.LakeBàA - validate_only (BàA"G -DeleteLakeRequest2 -name ( B$àAúA -dataplex.googleapis.com/Lake"ª -ListLakesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"z -ListLakesResponse- -lakes ( 2.google.cloud.dataplex.v1.Lake -next_page_token (  -unreachable_locations ( " -ListLakeActionsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA"a -ListActionsResponse1 -actions ( 2 .google.cloud.dataplex.v1.Action -next_page_token ( "D -GetLakeRequest2 -name ( B$àAúA -dataplex.googleapis.com/Lake"® -CreateZoneRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake -zone_id ( BàA1 -zone ( 2.google.cloud.dataplex.v1.ZoneBàA - validate_only (BàA"˜ -UpdateZoneRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA1 -zone ( 2.google.cloud.dataplex.v1.ZoneBàA - validate_only (BàA"G -DeleteZoneRequest2 -name ( B$àAúA -dataplex.googleapis.com/Zone"¥ -ListZonesRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"[ -ListZonesResponse- -zones ( 2.google.cloud.dataplex.v1.Zone -next_page_token ( " -ListZoneActionsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Zone - page_size (BàA - -page_token ( BàA"D -GetZoneRequest2 -name ( B$àAúA -dataplex.googleapis.com/Zone"² -CreateAssetRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Zone -asset_id ( BàA3 -asset ( 2.google.cloud.dataplex.v1.AssetBàA - validate_only (BàA"› -UpdateAssetRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA3 -asset ( 2.google.cloud.dataplex.v1.AssetBàA - validate_only (BàA"I -DeleteAssetRequest3 -name ( B%àAúA -dataplex.googleapis.com/Asset"¦ -ListAssetsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Zone - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"^ -ListAssetsResponse/ -assets ( 2.google.cloud.dataplex.v1.Asset -next_page_token ( " -ListAssetActionsRequest5 -parent ( B%àAúA -dataplex.googleapis.com/Asset - page_size (BàA - -page_token ( BàA"F -GetAssetRequest3 -name ( B%àAúA -dataplex.googleapis.com/Asset"€ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàA"® -CreateTaskRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake -task_id ( BàA1 -task ( 2.google.cloud.dataplex.v1.TaskBàA - validate_only (BàA"˜ -UpdateTaskRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA1 -task ( 2.google.cloud.dataplex.v1.TaskBàA - validate_only (BàA"G -DeleteTaskRequest2 -name ( B$àAúA -dataplex.googleapis.com/Task"¥ -ListTasksRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"z -ListTasksResponse- -tasks ( 2.google.cloud.dataplex.v1.Task -next_page_token (  -unreachable_locations ( "D -GetTaskRequest2 -name ( B$àAúA -dataplex.googleapis.com/Task"B - GetJobRequest1 -name ( B#àAúA -dataplex.googleapis.com/Job"² -RunTaskRequest2 -name ( B$àAúA -dataplex.googleapis.com/TaskI -labels ( 24.google.cloud.dataplex.v1.RunTaskRequest.LabelsEntryBàAE -args ( 22.google.cloud.dataplex.v1.RunTaskRequest.ArgsEntryBàA- - LabelsEntry -key (  -value ( :8+ - ArgsEntry -key (  -value ( :8"= -RunTaskResponse* -job ( 2.google.cloud.dataplex.v1.Job"x -ListJobsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Task - page_size (BàA - -page_token ( BàA"X -ListJobsResponse+ -jobs ( 2.google.cloud.dataplex.v1.Job -next_page_token ( "E -CancelJobRequest1 -name ( B#àAúA -dataplex.googleapis.com/Job"Ê -CreateEnvironmentRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake -environment_id ( BàA? - environment ( 2%.google.cloud.dataplex.v1.EnvironmentBàA - validate_only (BàA"­ -UpdateEnvironmentRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA? - environment ( 2%.google.cloud.dataplex.v1.EnvironmentBàA - validate_only (BàA"U -DeleteEnvironmentRequest9 -name ( B+àAúA% -#dataplex.googleapis.com/Environment"¬ -ListEnvironmentsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"p -ListEnvironmentsResponse; - environments ( 2%.google.cloud.dataplex.v1.Environment -next_page_token ( "R -GetEnvironmentRequest9 -name ( B+àAúA% -#dataplex.googleapis.com/Environment"˜ -ListSessionsRequest; -parent ( B+àAúA% -#dataplex.googleapis.com/Environment - page_size (BàA - -page_token ( BàA -filter ( BàA"d -ListSessionsResponse3 -sessions ( 2!.google.cloud.dataplex.v1.Session -next_page_token ( 2¬2 -DataplexServiceà - -CreateLake+.google.cloud.dataplex.v1.CreateLakeRequest.google.longrunning.Operation"i‚Óä“1")/v1/{parent=projects/*/locations/*}/lakes:lakeÚAparent,lake,lake_idÊA -LakeOperationMetadataÅ - -UpdateLake+.google.cloud.dataplex.v1.UpdateLakeRequest.google.longrunning.Operation"k‚Óä“62./v1/{lake.name=projects/*/locations/*/lakes/*}:lakeÚAlake,update_maskÊA -LakeOperationMetadata¿ - -DeleteLake+.google.cloud.dataplex.v1.DeleteLakeRequest.google.longrunning.Operation"e‚Óä“+*)/v1/{name=projects/*/locations/*/lakes/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadata  - ListLakes*.google.cloud.dataplex.v1.ListLakesRequest+.google.cloud.dataplex.v1.ListLakesResponse":‚Óä“+)/v1/{parent=projects/*/locations/*}/lakesÚAparent -GetLake(.google.cloud.dataplex.v1.GetLakeRequest.google.cloud.dataplex.v1.Lake"8‚Óä“+)/v1/{name=projects/*/locations/*/lakes/*}ÚAname¸ -ListLakeActions0.google.cloud.dataplex.v1.ListLakeActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"D‚Óä“53/v1/{parent=projects/*/locations/*/lakes/*}/actionsÚAparentË - -CreateZone+.google.cloud.dataplex.v1.CreateZoneRequest.google.longrunning.Operation"q‚Óä“9"1/v1/{parent=projects/*/locations/*/lakes/*}/zones:zoneÚAparent,zone,zone_idÊA -ZoneOperationMetadataÍ - -UpdateZone+.google.cloud.dataplex.v1.UpdateZoneRequest.google.longrunning.Operation"s‚Óä“>26/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}:zoneÚAzone,update_maskÊA -ZoneOperationMetadataÇ - -DeleteZone+.google.cloud.dataplex.v1.DeleteZoneRequest.google.longrunning.Operation"m‚Óä“3*1/v1/{name=projects/*/locations/*/lakes/*/zones/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadata¨ - ListZones*.google.cloud.dataplex.v1.ListZonesRequest+.google.cloud.dataplex.v1.ListZonesResponse"B‚Óä“31/v1/{parent=projects/*/locations/*/lakes/*}/zonesÚAparent• -GetZone(.google.cloud.dataplex.v1.GetZoneRequest.google.cloud.dataplex.v1.Zone"@‚Óä“31/v1/{name=projects/*/locations/*/lakes/*/zones/*}ÚAnameÀ -ListZoneActions0.google.cloud.dataplex.v1.ListZoneActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"L‚Óä“=;/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actionsÚAparentÚ - CreateAsset,.google.cloud.dataplex.v1.CreateAssetRequest.google.longrunning.Operation"~‚Óä“C":/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets:assetÚAparent,asset,asset_idÊA -AssetOperationMetadataÝ - UpdateAsset,.google.cloud.dataplex.v1.UpdateAssetRequest.google.longrunning.Operation"€‚Óä“I2@/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}:assetÚAasset,update_maskÊA -AssetOperationMetadataÒ - DeleteAsset,.google.cloud.dataplex.v1.DeleteAssetRequest.google.longrunning.Operation"v‚Óä“<*:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadata´ - -ListAssets+.google.cloud.dataplex.v1.ListAssetsRequest,.google.cloud.dataplex.v1.ListAssetsResponse"K‚Óä“<:/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assetsÚAparent¡ -GetAsset).google.cloud.dataplex.v1.GetAssetRequest.google.cloud.dataplex.v1.Asset"I‚Óä“<:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}ÚAnameË -ListAssetActions1.google.cloud.dataplex.v1.ListAssetActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"U‚Óä“FD/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actionsÚAparentË - -CreateTask+.google.cloud.dataplex.v1.CreateTaskRequest.google.longrunning.Operation"q‚Óä“9"1/v1/{parent=projects/*/locations/*/lakes/*}/tasks:taskÚAparent,task,task_idÊA -TaskOperationMetadataÍ - -UpdateTask+.google.cloud.dataplex.v1.UpdateTaskRequest.google.longrunning.Operation"s‚Óä“>26/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}:taskÚAtask,update_maskÊA -TaskOperationMetadataÇ - -DeleteTask+.google.cloud.dataplex.v1.DeleteTaskRequest.google.longrunning.Operation"m‚Óä“3*1/v1/{name=projects/*/locations/*/lakes/*/tasks/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadata¨ - ListTasks*.google.cloud.dataplex.v1.ListTasksRequest+.google.cloud.dataplex.v1.ListTasksResponse"B‚Óä“31/v1/{parent=projects/*/locations/*/lakes/*}/tasksÚAparent• -GetTask(.google.cloud.dataplex.v1.GetTaskRequest.google.cloud.dataplex.v1.Task"@‚Óä“31/v1/{name=projects/*/locations/*/lakes/*/tasks/*}ÚAname¬ -ListJobs).google.cloud.dataplex.v1.ListJobsRequest*.google.cloud.dataplex.v1.ListJobsResponse"I‚Óä“:8/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobsÚAparent§ -RunTask(.google.cloud.dataplex.v1.RunTaskRequest).google.cloud.dataplex.v1.RunTaskResponse"G‚Óä“:"5/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run:*ÚAname™ -GetJob\'.google.cloud.dataplex.v1.GetJobRequest.google.cloud.dataplex.v1.Job"G‚Óä“:8/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}ÚAname¢ - CancelJob*.google.cloud.dataplex.v1.CancelJobRequest.google.protobuf.Empty"Q‚Óä“D"?/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel:*ÚAnameý -CreateEnvironment2.google.cloud.dataplex.v1.CreateEnvironmentRequest.google.longrunning.Operation"”‚Óä“G"8/v1/{parent=projects/*/locations/*/lakes/*}/environments: environmentÚA!parent,environment,environment_idÊA - EnvironmentOperationMetadataÿ -UpdateEnvironment2.google.cloud.dataplex.v1.UpdateEnvironmentRequest.google.longrunning.Operation"–‚Óä“S2D/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}: environmentÚAenvironment,update_maskÊA - EnvironmentOperationMetadataÜ -DeleteEnvironment2.google.cloud.dataplex.v1.DeleteEnvironmentRequest.google.longrunning.Operation"t‚Óä“:*8/v1/{name=projects/*/locations/*/lakes/*/environments/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataÄ -ListEnvironments1.google.cloud.dataplex.v1.ListEnvironmentsRequest2.google.cloud.dataplex.v1.ListEnvironmentsResponse"I‚Óä“:8/v1/{parent=projects/*/locations/*/lakes/*}/environmentsÚAparent± -GetEnvironment/.google.cloud.dataplex.v1.GetEnvironmentRequest%.google.cloud.dataplex.v1.Environment"G‚Óä“:8/v1/{name=projects/*/locations/*/lakes/*/environments/*}ÚAnameà - ListSessions-.google.cloud.dataplex.v1.ListSessionsRequest..google.cloud.dataplex.v1.ListSessionsResponse"T‚Óä“EC/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessionsÚAparentKÊAdataplex.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBh -com.google.cloud.dataplex.v1B ServiceProtoPZ8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php deleted file mode 100644 index e1eb3b051c3159d116c84c623fd0fec37971a01c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4969 zcmbtYPjlPW5jRQkkCwKiz_CLkPJ+trL~au@k~3+Bj+26aBr{Pcm86`c!x;<+K2k6t z0Kp&Csz=jXzd?J*rM>jl$)%s6hklEk^AURL?t1`8iIOS1I*7n~Z};un{q1k};j=H? zLl^ETJIrRD9gK#uro?m=K6M6&&-n~wktOZR=HM>^mIDEQ}w1IsiNKhOjGxo`TKX`6wmTjn3p{>RElw|s_@ z^J_<;Z3L!cDuoMeXPXR?2`-d`2Ch0FwfSleuMdjXS#vo?c>sF zbw ztg%D=*mS&Vb$Y6)lFLLpEQ;HerRIXuk9GK0-#YPWBSg4iC|*OfXCj0G{m8vomWT1f z&&?=k>TsCEXd4l{k$9DS{673$f%{j1u2d4M${gV37~tjOP5DkFue)Z&i~K6^E^l0_ zI$juMhWu`{lIIDct}=`~6lr?z{Cp6*K`dDR+ih5)G?BJoiL$JeQc@eswfjG*ng6Qq z!rjDTp$Luj%b3*_F0%%i&>WW1TqJ`c(#KFVJcg8@(MF{V&J?%gvJe(qqLt+&7`0d` zbaAIhYUyfHB`6M~)IvyB=yCM~sKg*|6RNGTu`F|O!?1@<&!p{c4itj(yxqlSLzKNS1oR{6@>xR`L!Z_%%= z?oCSnBs45m(xt`Zth!^5%<+?J(l!)qCtw4|nUsDMN;Vf*(vH^8>XCoQfz+}`p6(-A z8c2?ePAz>4*?}Gyhoz6XeLD+O&ub{xNW6{}Eeu#fVrcjPRt?7vbQ6oAW*+HdRuW-( zjXlsCLQ#wKbV8fb=t)ZILGjo%G@Au~aL~zr6_NVv)erI1HQGYSleGK|+`8~k(p^{; z=x{t=GaNL7^FmgjS%I5J`g8643W}LnA^$lIw=O)2BtcfVNbn5Lj@z*OOh4AOXS(Mj znPiZE_&8eOo&<-8bu9f8^oNgxlFYgQ$a*gG0uv{ecw&C@>JGWk%raJ-Nb@v{_mUueC-CI!b zjYBpJEyfvCz~srb^(xjdG)H<9)_ULVH?@OycfVP0ZMT|@wQCrb<-NAnXnw7>8*3?g z?KJBLoldL0vz8|3;6_Bv@?X+$;|x_I;V$VOI$faalLhWMBU@Hca0(tuDW7@ArolAb z5Gj>ZtTbAlM=(EQM!*joB|r^ia>X-e5G5P&zGaRWFRlgd<~y-bD9;53e`=gN@g^QtPyWKn-!EWx@R1k$J{0nyU3qi zxM`lL45Ek%ye=v>^A&+RxK@DN(8Jw4`CloJ=1UUcJSl91b8bvpy2KdKGQFlT$S^Zb z$xg}gyi;8@HodTCvbn4<}`>`u_ai0KK*fRM60hWWUxb;qq&iVf8OJ_h1%*Y=? zai(EfgvRRdXH{R&m#R@N`IQ&Z(`m(W41RUMvG@@O^$DW^{5cgj&dQ4bo03zCDi(F@ zOxFLMhYZ>(ZJue6@9_rt9eDe)2AM?W`{T1jc}2%=LV?*s!L3*9jeirjxx_ImTlZcX zhS^pZ*_W92B&zz98aH^Dq(_jC2rTNIf4M-ZU^^jx4_?0441N-0BUUdJxd#>)8&x(TJl|%Ee*Kl(>{rG1`bUuO3b#pb!Od>7 z^R!hzU(T*Wp`rHF{mx!}Ew%1JmS0qmW!~ua)ZY2kMaXv!+HIU{ZguhQ!bU*d`PX%E`7gxIRj-BcEDZB>bC#pF0-NB>j;~google.cloud.dataplex.v1.Action - */ -class Action extends \Google\Protobuf\Internal\Message -{ - /** - * The category of issue associated with the action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; - */ - protected $category = 0; - /** - * Detailed description of the issue requiring action. - * - * Generated from protobuf field string issue = 2; - */ - protected $issue = ''; - /** - * The time that the issue was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; - */ - protected $detect_time = null; - /** - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $lake = ''; - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $zone = ''; - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $asset = ''; - /** - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * - * Generated from protobuf field repeated string data_locations = 9; - */ - private $data_locations; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $category - * The category of issue associated with the action. - * @type string $issue - * Detailed description of the issue requiring action. - * @type \Google\Protobuf\Timestamp $detect_time - * The time that the issue was detected. - * @type string $name - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * @type string $lake - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $zone - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type string $asset - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat $invalid_data_format - * Details for issues related to invalid or unsupported data formats. - * @type \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema $incompatible_data_schema - * Details for issues related to incompatible schemas detected within data. - * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition $invalid_data_partition - * Details for issues related to invalid or unsupported data partition - * structure. - * @type \Google\Cloud\Dataplex\V1\Action\MissingData $missing_data - * Details for issues related to absence of data within managed resources. - * @type \Google\Cloud\Dataplex\V1\Action\MissingResource $missing_resource - * Details for issues related to absence of a managed resource. - * @type \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource $unauthorized_resource - * Details for issues related to lack of permissions to access data - * resources. - * @type \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply $failed_security_policy_apply - * Details for issues related to applying security policy. - * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization $invalid_data_organization - * Details for issues related to invalid data arrangement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The category of issue associated with the action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; - * @return int - */ - public function getCategory() - { - return $this->category; - } - - /** - * The category of issue associated with the action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; - * @param int $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\Category::class); - $this->category = $var; - - return $this; - } - - /** - * Detailed description of the issue requiring action. - * - * Generated from protobuf field string issue = 2; - * @return string - */ - public function getIssue() - { - return $this->issue; - } - - /** - * Detailed description of the issue requiring action. - * - * Generated from protobuf field string issue = 2; - * @param string $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkString($var, True); - $this->issue = $var; - - return $this; - } - - /** - * The time that the issue was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDetectTime() - { - return $this->detect_time; - } - - public function hasDetectTime() - { - return isset($this->detect_time); - } - - public function clearDetectTime() - { - unset($this->detect_time); - } - - /** - * The time that the issue was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDetectTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->detect_time = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getLake() - { - return $this->lake; - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLake($var) - { - GPBUtil::checkString($var, True); - $this->lake = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * - * Generated from protobuf field repeated string data_locations = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataLocations() - { - return $this->data_locations; - } - - /** - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * - * Generated from protobuf field repeated string data_locations = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_locations = $arr; - - return $this; - } - - /** - * Details for issues related to invalid or unsupported data formats. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataFormat invalid_data_format = 10; - * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat|null - */ - public function getInvalidDataFormat() - { - return $this->readOneof(10); - } - - public function hasInvalidDataFormat() - { - return $this->hasOneof(10); - } - - /** - * Details for issues related to invalid or unsupported data formats. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataFormat invalid_data_format = 10; - * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat $var - * @return $this - */ - public function setInvalidDataFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Details for issues related to incompatible schemas detected within data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema incompatible_data_schema = 11; - * @return \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema|null - */ - public function getIncompatibleDataSchema() - { - return $this->readOneof(11); - } - - public function hasIncompatibleDataSchema() - { - return $this->hasOneof(11); - } - - /** - * Details for issues related to incompatible schemas detected within data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema incompatible_data_schema = 11; - * @param \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema $var - * @return $this - */ - public function setIncompatibleDataSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Details for issues related to invalid or unsupported data partition - * structure. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition invalid_data_partition = 12; - * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition|null - */ - public function getInvalidDataPartition() - { - return $this->readOneof(12); - } - - public function hasInvalidDataPartition() - { - return $this->hasOneof(12); - } - - /** - * Details for issues related to invalid or unsupported data partition - * structure. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition invalid_data_partition = 12; - * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition $var - * @return $this - */ - public function setInvalidDataPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Details for issues related to absence of data within managed resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingData missing_data = 13; - * @return \Google\Cloud\Dataplex\V1\Action\MissingData|null - */ - public function getMissingData() - { - return $this->readOneof(13); - } - - public function hasMissingData() - { - return $this->hasOneof(13); - } - - /** - * Details for issues related to absence of data within managed resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingData missing_data = 13; - * @param \Google\Cloud\Dataplex\V1\Action\MissingData $var - * @return $this - */ - public function setMissingData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\MissingData::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Details for issues related to absence of a managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingResource missing_resource = 14; - * @return \Google\Cloud\Dataplex\V1\Action\MissingResource|null - */ - public function getMissingResource() - { - return $this->readOneof(14); - } - - public function hasMissingResource() - { - return $this->hasOneof(14); - } - - /** - * Details for issues related to absence of a managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingResource missing_resource = 14; - * @param \Google\Cloud\Dataplex\V1\Action\MissingResource $var - * @return $this - */ - public function setMissingResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\MissingResource::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Details for issues related to lack of permissions to access data - * resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.UnauthorizedResource unauthorized_resource = 15; - * @return \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource|null - */ - public function getUnauthorizedResource() - { - return $this->readOneof(15); - } - - public function hasUnauthorizedResource() - { - return $this->hasOneof(15); - } - - /** - * Details for issues related to lack of permissions to access data - * resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.UnauthorizedResource unauthorized_resource = 15; - * @param \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource $var - * @return $this - */ - public function setUnauthorizedResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Details for issues related to applying security policy. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply failed_security_policy_apply = 21; - * @return \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply|null - */ - public function getFailedSecurityPolicyApply() - { - return $this->readOneof(21); - } - - public function hasFailedSecurityPolicyApply() - { - return $this->hasOneof(21); - } - - /** - * Details for issues related to applying security policy. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply failed_security_policy_apply = 21; - * @param \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply $var - * @return $this - */ - public function setFailedSecurityPolicyApply($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Details for issues related to invalid data arrangement. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataOrganization invalid_data_organization = 22; - * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization|null - */ - public function getInvalidDataOrganization() - { - return $this->readOneof(22); - } - - public function hasInvalidDataOrganization() - { - return $this->hasOneof(22); - } - - /** - * Details for issues related to invalid data arrangement. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataOrganization invalid_data_organization = 22; - * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization $var - * @return $this - */ - public function setInvalidDataOrganization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php deleted file mode 100644 index ce9240e40a4a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.Action.Category - */ -class Category -{ - /** - * Unspecified category. - * - * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; - */ - const CATEGORY_UNSPECIFIED = 0; - /** - * Resource management related issues. - * - * Generated from protobuf enum RESOURCE_MANAGEMENT = 1; - */ - const RESOURCE_MANAGEMENT = 1; - /** - * Security policy related issues. - * - * Generated from protobuf enum SECURITY_POLICY = 2; - */ - const SECURITY_POLICY = 2; - /** - * Data and discovery related issues. - * - * Generated from protobuf enum DATA_DISCOVERY = 3; - */ - const DATA_DISCOVERY = 3; - - private static $valueToName = [ - self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', - self::RESOURCE_MANAGEMENT => 'RESOURCE_MANAGEMENT', - self::SECURITY_POLICY => 'SECURITY_POLICY', - self::DATA_DISCOVERY => 'DATA_DISCOVERY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Category::class, \Google\Cloud\Dataplex\V1\Action_Category::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php deleted file mode 100644 index 4b04784bc750..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - */ -class FailedSecurityPolicyApply extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * - * Generated from protobuf field string asset = 1; - */ - protected $asset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $asset - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * - * Generated from protobuf field string asset = 1; - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * - * Generated from protobuf field string asset = 1; - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FailedSecurityPolicyApply::class, \Google\Cloud\Dataplex\V1\Action_FailedSecurityPolicyApply::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php deleted file mode 100644 index cd0596053a2c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.dataplex.v1.Action.IncompatibleDataSchema - */ -class IncompatibleDataSchema extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the table containing invalid data. - * - * Generated from protobuf field string table = 1; - */ - protected $table = ''; - /** - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * - * Generated from protobuf field string existing_schema = 2; - */ - protected $existing_schema = ''; - /** - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * - * Generated from protobuf field string new_schema = 3; - */ - protected $new_schema = ''; - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - */ - private $sampled_data_locations; - /** - * Whether the action relates to a schema that is incompatible or modified. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; - */ - protected $schema_change = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * The name of the table containing invalid data. - * @type string $existing_schema - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * @type string $new_schema - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations - * The list of data locations sampled and used for format/schema - * inference. - * @type int $schema_change - * Whether the action relates to a schema that is incompatible or modified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the table containing invalid data. - * - * Generated from protobuf field string table = 1; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * The name of the table containing invalid data. - * - * Generated from protobuf field string table = 1; - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - - /** - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * - * Generated from protobuf field string existing_schema = 2; - * @return string - */ - public function getExistingSchema() - { - return $this->existing_schema; - } - - /** - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * - * Generated from protobuf field string existing_schema = 2; - * @param string $var - * @return $this - */ - public function setExistingSchema($var) - { - GPBUtil::checkString($var, True); - $this->existing_schema = $var; - - return $this; - } - - /** - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * - * Generated from protobuf field string new_schema = 3; - * @return string - */ - public function getNewSchema() - { - return $this->new_schema; - } - - /** - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * - * Generated from protobuf field string new_schema = 3; - * @param string $var - * @return $this - */ - public function setNewSchema($var) - { - GPBUtil::checkString($var, True); - $this->new_schema = $var; - - return $this; - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampledDataLocations() - { - return $this->sampled_data_locations; - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampledDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sampled_data_locations = $arr; - - return $this; - } - - /** - * Whether the action relates to a schema that is incompatible or modified. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; - * @return int - */ - public function getSchemaChange() - { - return $this->schema_change; - } - - /** - * Whether the action relates to a schema that is incompatible or modified. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; - * @param int $var - * @return $this - */ - public function setSchemaChange($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema\SchemaChange::class); - $this->schema_change = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncompatibleDataSchema::class, \Google\Cloud\Dataplex\V1\Action_IncompatibleDataSchema::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php deleted file mode 100644 index e9b83fdb588c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange - */ -class SchemaChange -{ - /** - * Schema change unspecified. - * - * Generated from protobuf enum SCHEMA_CHANGE_UNSPECIFIED = 0; - */ - const SCHEMA_CHANGE_UNSPECIFIED = 0; - /** - * Newly discovered schema is incompatible with existing schema. - * - * Generated from protobuf enum INCOMPATIBLE = 1; - */ - const INCOMPATIBLE = 1; - /** - * Newly discovered schema has changed from existing schema for data in a - * curated zone. - * - * Generated from protobuf enum MODIFIED = 2; - */ - const MODIFIED = 2; - - private static $valueToName = [ - self::SCHEMA_CHANGE_UNSPECIFIED => 'SCHEMA_CHANGE_UNSPECIFIED', - self::INCOMPATIBLE => 'INCOMPATIBLE', - self::MODIFIED => 'MODIFIED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchemaChange::class, \Google\Cloud\Dataplex\V1\Action_IncompatibleDataSchema_SchemaChange::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php deleted file mode 100644 index f1c8b0a2da3c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataFormat - */ -class InvalidDataFormat extends \Google\Protobuf\Internal\Message -{ - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 1; - */ - private $sampled_data_locations; - /** - * The expected data format of the entity. - * - * Generated from protobuf field string expected_format = 2; - */ - protected $expected_format = ''; - /** - * The new unexpected data format within the entity. - * - * Generated from protobuf field string new_format = 3; - */ - protected $new_format = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations - * The list of data locations sampled and used for format/schema - * inference. - * @type string $expected_format - * The expected data format of the entity. - * @type string $new_format - * The new unexpected data format within the entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampledDataLocations() - { - return $this->sampled_data_locations; - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampledDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sampled_data_locations = $arr; - - return $this; - } - - /** - * The expected data format of the entity. - * - * Generated from protobuf field string expected_format = 2; - * @return string - */ - public function getExpectedFormat() - { - return $this->expected_format; - } - - /** - * The expected data format of the entity. - * - * Generated from protobuf field string expected_format = 2; - * @param string $var - * @return $this - */ - public function setExpectedFormat($var) - { - GPBUtil::checkString($var, True); - $this->expected_format = $var; - - return $this; - } - - /** - * The new unexpected data format within the entity. - * - * Generated from protobuf field string new_format = 3; - * @return string - */ - public function getNewFormat() - { - return $this->new_format; - } - - /** - * The new unexpected data format within the entity. - * - * Generated from protobuf field string new_format = 3; - * @param string $var - * @return $this - */ - public function setNewFormat($var) - { - GPBUtil::checkString($var, True); - $this->new_format = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InvalidDataFormat::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataFormat::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php deleted file mode 100644 index bea138d90c89..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataOrganization - */ -class InvalidDataOrganization extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InvalidDataOrganization::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataOrganization::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php deleted file mode 100644 index 754a46df3975..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataPartition - */ -class InvalidDataPartition extends \Google\Protobuf\Internal\Message -{ - /** - * The issue type of InvalidDataPartition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; - */ - protected $expected_structure = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $expected_structure - * The issue type of InvalidDataPartition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The issue type of InvalidDataPartition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; - * @return int - */ - public function getExpectedStructure() - { - return $this->expected_structure; - } - - /** - * The issue type of InvalidDataPartition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; - * @param int $var - * @return $this - */ - public function setExpectedStructure($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition\PartitionStructure::class); - $this->expected_structure = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InvalidDataPartition::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataPartition::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php deleted file mode 100644 index 89f807e2f256..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure - */ -class PartitionStructure -{ - /** - * PartitionStructure unspecified. - * - * Generated from protobuf enum PARTITION_STRUCTURE_UNSPECIFIED = 0; - */ - const PARTITION_STRUCTURE_UNSPECIFIED = 0; - /** - * Consistent hive-style partition definition (both raw and curated zone). - * - * Generated from protobuf enum CONSISTENT_KEYS = 1; - */ - const CONSISTENT_KEYS = 1; - /** - * Hive style partition definition (curated zone only). - * - * Generated from protobuf enum HIVE_STYLE_KEYS = 2; - */ - const HIVE_STYLE_KEYS = 2; - - private static $valueToName = [ - self::PARTITION_STRUCTURE_UNSPECIFIED => 'PARTITION_STRUCTURE_UNSPECIFIED', - self::CONSISTENT_KEYS => 'CONSISTENT_KEYS', - self::HIVE_STYLE_KEYS => 'HIVE_STYLE_KEYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionStructure::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataPartition_PartitionStructure::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php deleted file mode 100644 index aa342f1f091c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Action.MissingData - */ -class MissingData extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MissingData::class, \Google\Cloud\Dataplex\V1\Action_MissingData::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php deleted file mode 100644 index a22aefa1573a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Action.MissingResource - */ -class MissingResource extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MissingResource::class, \Google\Cloud\Dataplex\V1\Action_MissingResource::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php deleted file mode 100644 index ed6bd9eeb793..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php +++ /dev/null @@ -1,38 +0,0 @@ -google.cloud.dataplex.v1.Action.UnauthorizedResource - */ -class UnauthorizedResource extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnauthorizedResource::class, \Google\Cloud\Dataplex\V1\Action_UnauthorizedResource::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php deleted file mode 100644 index 86dcebf8476a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php +++ /dev/null @@ -1,574 +0,0 @@ -google.cloud.dataplex.v1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the asset 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 when the asset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the asset. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the asset. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Specification of the resource that is referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_spec = null; - /** - * Output only. Status of the resource referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_status = null; - /** - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $security_status = null; - /** - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $discovery_spec = null; - /** - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $discovery_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the asset was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the asset was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the asset. - * @type string $description - * Optional. Description of the asset. - * @type int $state - * Output only. Current state of the asset. - * @type \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $resource_spec - * Required. Specification of the resource that is referenced by this asset. - * @type \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $resource_status - * Output only. Status of the resource referenced by this asset. - * @type \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $security_status - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $discovery_spec - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $discovery_status - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the asset 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 when the asset 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 when the asset 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 when the asset 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; - } - - /** - * Optional. User defined labels for the asset. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the asset. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the asset. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the asset. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Specification of the resource that is referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Asset\ResourceSpec|null - */ - public function getResourceSpec() - { - return $this->resource_spec; - } - - public function hasResourceSpec() - { - return isset($this->resource_spec); - } - - public function clearResourceSpec() - { - unset($this->resource_spec); - } - - /** - * Required. Specification of the resource that is referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $var - * @return $this - */ - public function setResourceSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec::class); - $this->resource_spec = $var; - - return $this; - } - - /** - * Output only. Status of the resource referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Asset\ResourceStatus|null - */ - public function getResourceStatus() - { - return $this->resource_status; - } - - public function hasResourceStatus() - { - return isset($this->resource_status); - } - - public function clearResourceStatus() - { - unset($this->resource_status); - } - - /** - * Output only. Status of the resource referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $var - * @return $this - */ - public function setResourceStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceStatus::class); - $this->resource_status = $var; - - return $this; - } - - /** - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Asset\SecurityStatus|null - */ - public function getSecurityStatus() - { - return $this->security_status; - } - - public function hasSecurityStatus() - { - return isset($this->security_status); - } - - public function clearSecurityStatus() - { - unset($this->security_status); - } - - /** - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $var - * @return $this - */ - public function setSecurityStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\SecurityStatus::class); - $this->security_status = $var; - - return $this; - } - - /** - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec|null - */ - public function getDiscoverySpec() - { - return $this->discovery_spec; - } - - public function hasDiscoverySpec() - { - return isset($this->discovery_spec); - } - - public function clearDiscoverySpec() - { - unset($this->discovery_spec); - } - - /** - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $var - * @return $this - */ - public function setDiscoverySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec::class); - $this->discovery_spec = $var; - - return $this; - } - - /** - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus|null - */ - public function getDiscoveryStatus() - { - return $this->discovery_status; - } - - public function hasDiscoveryStatus() - { - return isset($this->discovery_status); - } - - public function clearDiscoveryStatus() - { - unset($this->discovery_status); - } - - /** - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $var - * @return $this - */ - public function setDiscoveryStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus::class); - $this->discovery_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php deleted file mode 100644 index 6fa21b6e43c2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoverySpec - */ -class DiscoverySpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_patterns; - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclude_patterns; - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $csv_options = null; - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $json_options = null; - protected $trigger; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Optional. Whether discovery is enabled. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_patterns - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_patterns - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions $csv_options - * Optional. Configuration for CSV data. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions $json_options - * Optional. Configuration for Json data. - * @type string $schedule - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludePatterns() - { - return $this->include_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_patterns = $arr; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludePatterns() - { - return $this->exclude_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclude_patterns = $arr; - - return $this; - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions|null - */ - public function getCsvOptions() - { - return $this->csv_options; - } - - public function hasCsvOptions() - { - return isset($this->csv_options); - } - - public function clearCsvOptions() - { - unset($this->csv_options); - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions $var - * @return $this - */ - public function setCsvOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions::class); - $this->csv_options = $var; - - return $this; - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions|null - */ - public function getJsonOptions() - { - return $this->json_options; - } - - public function hasJsonOptions() - { - return isset($this->json_options); - } - - public function clearJsonOptions() - { - unset($this->json_options); - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions $var - * @return $this - */ - public function setJsonOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions::class); - $this->json_options = $var; - - return $this; - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSchedule() - { - return $this->readOneof(10); - } - - public function hasSchedule() - { - return $this->hasOneof(10); - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * @return string - */ - public function getTrigger() - { - return $this->whichOneof("trigger"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiscoverySpec::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php deleted file mode 100644 index 3380aa019da7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - */ -class CsvOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header_rows = 0; - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $header_rows - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * @type string $delimiter - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHeaderRows($var) - { - GPBUtil::checkInt32($var); - $this->header_rows = $var; - - return $this; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec_CsvOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php deleted file mode 100644 index ac4b34455c86..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - */ -class JsonOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec_JsonOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php deleted file mode 100644 index fb128a346880..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoveryStatus - */ -class DiscoveryStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The current status of the discovery feature. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * The start time of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; - */ - protected $last_run_time = null; - /** - * Data Stats of the asset reported by discovery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; - */ - protected $stats = null; - /** - * The duration of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; - */ - protected $last_run_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current status of the discovery feature. - * @type string $message - * Additional information about the current state. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * @type \Google\Protobuf\Timestamp $last_run_time - * The start time of the last discovery run. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $stats - * Data Stats of the asset reported by discovery. - * @type \Google\Protobuf\Duration $last_run_duration - * The duration of the last discovery run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The current status of the discovery feature. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current status of the discovery feature. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @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); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The start time of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastRunTime() - { - return $this->last_run_time; - } - - public function hasLastRunTime() - { - return isset($this->last_run_time); - } - - public function clearLastRunTime() - { - unset($this->last_run_time); - } - - /** - * The start time of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_run_time = $var; - - return $this; - } - - /** - * Data Stats of the asset reported by discovery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Data Stats of the asset reported by discovery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats::class); - $this->stats = $var; - - return $this; - } - - /** - * The duration of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getLastRunDuration() - { - return $this->last_run_duration; - } - - public function hasLastRunDuration() - { - return isset($this->last_run_duration); - } - - public function clearLastRunDuration() - { - unset($this->last_run_duration); - } - - /** - * The duration of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLastRunDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->last_run_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiscoveryStatus::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php deleted file mode 100644 index 25093e6007a0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoveryStatus.State - */ -class State -{ - /** - * State is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Discovery for the asset is scheduled. - * - * Generated from protobuf enum SCHEDULED = 1; - */ - const SCHEDULED = 1; - /** - * Discovery for the asset is running. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * Discovery for the asset is currently paused (e.g. due to a lack - * of available resources). It will be automatically resumed. - * - * Generated from protobuf enum PAUSED = 3; - */ - const PAUSED = 3; - /** - * Discovery for the asset is disabled. - * - * Generated from protobuf enum DISABLED = 5; - */ - const DISABLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SCHEDULED => 'SCHEDULED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::PAUSED => 'PAUSED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php deleted file mode 100644 index 0b04d36fd07b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - */ -class Stats extends \Google\Protobuf\Internal\Message -{ - /** - * The count of data items within the referenced resource. - * - * Generated from protobuf field int64 data_items = 1; - */ - protected $data_items = 0; - /** - * The number of stored data bytes within the referenced resource. - * - * Generated from protobuf field int64 data_size = 2; - */ - protected $data_size = 0; - /** - * The count of table entities within the referenced resource. - * - * Generated from protobuf field int64 tables = 3; - */ - protected $tables = 0; - /** - * The count of fileset entities within the referenced resource. - * - * Generated from protobuf field int64 filesets = 4; - */ - protected $filesets = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $data_items - * The count of data items within the referenced resource. - * @type int|string $data_size - * The number of stored data bytes within the referenced resource. - * @type int|string $tables - * The count of table entities within the referenced resource. - * @type int|string $filesets - * The count of fileset entities within the referenced resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The count of data items within the referenced resource. - * - * Generated from protobuf field int64 data_items = 1; - * @return int|string - */ - public function getDataItems() - { - return $this->data_items; - } - - /** - * The count of data items within the referenced resource. - * - * Generated from protobuf field int64 data_items = 1; - * @param int|string $var - * @return $this - */ - public function setDataItems($var) - { - GPBUtil::checkInt64($var); - $this->data_items = $var; - - return $this; - } - - /** - * The number of stored data bytes within the referenced resource. - * - * Generated from protobuf field int64 data_size = 2; - * @return int|string - */ - public function getDataSize() - { - return $this->data_size; - } - - /** - * The number of stored data bytes within the referenced resource. - * - * Generated from protobuf field int64 data_size = 2; - * @param int|string $var - * @return $this - */ - public function setDataSize($var) - { - GPBUtil::checkInt64($var); - $this->data_size = $var; - - return $this; - } - - /** - * The count of table entities within the referenced resource. - * - * Generated from protobuf field int64 tables = 3; - * @return int|string - */ - public function getTables() - { - return $this->tables; - } - - /** - * The count of table entities within the referenced resource. - * - * Generated from protobuf field int64 tables = 3; - * @param int|string $var - * @return $this - */ - public function setTables($var) - { - GPBUtil::checkInt64($var); - $this->tables = $var; - - return $this; - } - - /** - * The count of fileset entities within the referenced resource. - * - * Generated from protobuf field int64 filesets = 4; - * @return int|string - */ - public function getFilesets() - { - return $this->filesets; - } - - /** - * The count of fileset entities within the referenced resource. - * - * Generated from protobuf field int64 filesets = 4; - * @param int|string $var - * @return $this - */ - public function setFilesets($var) - { - GPBUtil::checkInt64($var); - $this->filesets = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Stats::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus_Stats::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php deleted file mode 100644 index 154209d8aae2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceSpec - */ -class ResourceSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Required. Immutable. Type of resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_access_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * @type int $type - * Required. Immutable. Type of resource. - * @type int $read_access_mode - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. Type of resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. Type of resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getReadAccessMode() - { - return $this->read_access_mode; - } - - /** - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setReadAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec\AccessMode::class); - $this->read_access_mode = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceSpec::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php deleted file mode 100644 index 5eefd16cbb83..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode - */ -class AccessMode -{ - /** - * Access mode unspecified. - * - * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; - */ - const ACCESS_MODE_UNSPECIFIED = 0; - /** - * Default. Data is accessed directly using storage APIs. - * - * Generated from protobuf enum DIRECT = 1; - */ - const DIRECT = 1; - /** - * Data is accessed through a managed interface using BigQuery APIs. - * - * Generated from protobuf enum MANAGED = 2; - */ - const MANAGED = 2; - - private static $valueToName = [ - self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_MODE_UNSPECIFIED', - self::DIRECT => 'DIRECT', - self::MANAGED => 'MANAGED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessMode::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec_AccessMode::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php deleted file mode 100644 index b0a24b084e6c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceSpec.Type - */ -class Type -{ - /** - * Type not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Cloud Storage bucket. - * - * Generated from protobuf enum STORAGE_BUCKET = 1; - */ - const STORAGE_BUCKET = 1; - /** - * BigQuery dataset. - * - * Generated from protobuf enum BIGQUERY_DATASET = 2; - */ - const BIGQUERY_DATASET = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::STORAGE_BUCKET => 'STORAGE_BUCKET', - self::BIGQUERY_DATASET => 'BIGQUERY_DATASET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php deleted file mode 100644 index 4a82e4f8b674..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceStatus - */ -class ResourceStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Output only. Service account associated with the BigQuery Connection. - * - * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $managed_access_identity = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the managed resource. - * @type string $message - * Additional information about the current state. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * @type string $managed_access_identity - * Output only. Service account associated with the BigQuery Connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @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); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @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. Service account associated with the BigQuery Connection. - * - * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getManagedAccessIdentity() - { - return $this->managed_access_identity; - } - - /** - * Output only. Service account associated with the BigQuery Connection. - * - * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setManagedAccessIdentity($var) - { - GPBUtil::checkString($var, True); - $this->managed_access_identity = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceStatus::class, \Google\Cloud\Dataplex\V1\Asset_ResourceStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php deleted file mode 100644 index a3d2646b2682..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceStatus.State - */ -class State -{ - /** - * State unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Resource does not have any errors. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * Resource has errors. - * - * Generated from protobuf enum ERROR = 2; - */ - const ERROR = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_ResourceStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php deleted file mode 100644 index 0551695cf24e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.dataplex.v1.Asset.SecurityStatus - */ -class SecurityStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the security policy applied to the attached - * resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the security policy applied to the attached - * resource. - * @type string $message - * Additional information about the current state. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the security policy applied to the attached - * resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the security policy applied to the attached - * resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\SecurityStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @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); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecurityStatus::class, \Google\Cloud\Dataplex\V1\Asset_SecurityStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php deleted file mode 100644 index 306952bcbe0b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.dataplex.v1.Asset.SecurityStatus.State - */ -class State -{ - /** - * State unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Security policy has been successfully applied to the attached resource. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * Security policy is in the process of being applied to the attached - * resource. - * - * Generated from protobuf enum APPLYING = 2; - */ - const APPLYING = 2; - /** - * Security policy could not be applied to the attached resource due to - * errors. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::APPLYING => 'APPLYING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_SecurityStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php deleted file mode 100644 index 0ac2ee4ec6d3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.dataplex.v1.AssetStatus - */ -class AssetStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * Number of active assets. - * - * Generated from protobuf field int32 active_assets = 2; - */ - protected $active_assets = 0; - /** - * Number of assets that are in process of updating the security policy on - * attached resources. - * - * Generated from protobuf field int32 security_policy_applying_assets = 3; - */ - protected $security_policy_applying_assets = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * @type int $active_assets - * Number of active assets. - * @type int $security_policy_applying_assets - * Number of assets that are in process of updating the security policy on - * attached resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Number of active assets. - * - * Generated from protobuf field int32 active_assets = 2; - * @return int - */ - public function getActiveAssets() - { - return $this->active_assets; - } - - /** - * Number of active assets. - * - * Generated from protobuf field int32 active_assets = 2; - * @param int $var - * @return $this - */ - public function setActiveAssets($var) - { - GPBUtil::checkInt32($var); - $this->active_assets = $var; - - return $this; - } - - /** - * Number of assets that are in process of updating the security policy on - * attached resources. - * - * Generated from protobuf field int32 security_policy_applying_assets = 3; - * @return int - */ - public function getSecurityPolicyApplyingAssets() - { - return $this->security_policy_applying_assets; - } - - /** - * Number of assets that are in process of updating the security policy on - * attached resources. - * - * Generated from protobuf field int32 security_policy_applying_assets = 3; - * @param int $var - * @return $this - */ - public function setSecurityPolicyApplyingAssets($var) - { - GPBUtil::checkInt32($var); - $this->security_policy_applying_assets = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php deleted file mode 100644 index 39eaf72e4716..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.CancelJobRequest - */ -class CancelJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * - * 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 job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. Please see - * {@see DataplexServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\CancelJobRequest - * - * @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 job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * - * 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 job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php deleted file mode 100644 index bdf804b99374..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php +++ /dev/null @@ -1,428 +0,0 @@ -google.cloud.dataplex.v1.Content - */ -class Content extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $path = ''; - /** - * Output only. Content creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the content was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the content. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the content. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - protected $data; - protected $content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @type string $uid - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * @type string $path - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Content creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the content was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the content. - * @type string $description - * Optional. Description of the content. - * @type string $data_text - * Required. Content data in string format. - * @type \Google\Cloud\Dataplex\V1\Content\SqlScript $sql_script - * Sql Script related configurations. - * @type \Google\Cloud\Dataplex\V1\Content\Notebook $notebook - * Notebook related configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Output only. Content creation 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. Content creation 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. The time when the content 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 when the content 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; - } - - /** - * Optional. User defined labels for the content. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the content. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the content. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the content. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Content data in string format. - * - * Generated from protobuf field string data_text = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataText() - { - return $this->readOneof(9); - } - - public function hasDataText() - { - return $this->hasOneof(9); - } - - /** - * Required. Content data in string format. - * - * Generated from protobuf field string data_text = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Sql Script related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript sql_script = 100; - * @return \Google\Cloud\Dataplex\V1\Content\SqlScript|null - */ - public function getSqlScript() - { - return $this->readOneof(100); - } - - public function hasSqlScript() - { - return $this->hasOneof(100); - } - - /** - * Sql Script related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript sql_script = 100; - * @param \Google\Cloud\Dataplex\V1\Content\SqlScript $var - * @return $this - */ - public function setSqlScript($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content\SqlScript::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Notebook related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook notebook = 101; - * @return \Google\Cloud\Dataplex\V1\Content\Notebook|null - */ - public function getNotebook() - { - return $this->readOneof(101); - } - - public function hasNotebook() - { - return $this->hasOneof(101); - } - - /** - * Notebook related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook notebook = 101; - * @param \Google\Cloud\Dataplex\V1\Content\Notebook $var - * @return $this - */ - public function setNotebook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content\Notebook::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - - /** - * @return string - */ - public function getContent() - { - return $this->whichOneof("content"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php deleted file mode 100644 index cca8345c3c8f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.Content.Notebook - */ -class Notebook extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Kernel Type of the notebook. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kernel_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $kernel_type - * Required. Kernel Type of the notebook. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Required. Kernel Type of the notebook. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getKernelType() - { - return $this->kernel_type; - } - - /** - * Required. Kernel Type of the notebook. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setKernelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Content\Notebook\KernelType::class); - $this->kernel_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Notebook::class, \Google\Cloud\Dataplex\V1\Content_Notebook::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php deleted file mode 100644 index a33a77e1cf4e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataplex.v1.Content.Notebook.KernelType - */ -class KernelType -{ - /** - * Kernel Type unspecified. - * - * Generated from protobuf enum KERNEL_TYPE_UNSPECIFIED = 0; - */ - const KERNEL_TYPE_UNSPECIFIED = 0; - /** - * Python 3 Kernel. - * - * Generated from protobuf enum PYTHON3 = 1; - */ - const PYTHON3 = 1; - - private static $valueToName = [ - self::KERNEL_TYPE_UNSPECIFIED => 'KERNEL_TYPE_UNSPECIFIED', - self::PYTHON3 => 'PYTHON3', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KernelType::class, \Google\Cloud\Dataplex\V1\Content_Notebook_KernelType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php deleted file mode 100644 index 89b5cc41b9be..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.Content.SqlScript - */ -class SqlScript extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Query Engine to be used for the Sql Query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $engine = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $engine - * Required. Query Engine to be used for the Sql Query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Required. Query Engine to be used for the Sql Query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getEngine() - { - return $this->engine; - } - - /** - * Required. Query Engine to be used for the Sql Query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEngine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Content\SqlScript\QueryEngine::class); - $this->engine = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlScript::class, \Google\Cloud\Dataplex\V1\Content_SqlScript::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php deleted file mode 100644 index fbc494c2393d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataplex.v1.Content.SqlScript.QueryEngine - */ -class QueryEngine -{ - /** - * Value was unspecified. - * - * Generated from protobuf enum QUERY_ENGINE_UNSPECIFIED = 0; - */ - const QUERY_ENGINE_UNSPECIFIED = 0; - /** - * Spark SQL Query. - * - * Generated from protobuf enum SPARK = 2; - */ - const SPARK = 2; - - private static $valueToName = [ - self::QUERY_ENGINE_UNSPECIFIED => 'QUERY_ENGINE_UNSPECIFIED', - self::SPARK => 'SPARK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryEngine::class, \Google\Cloud\Dataplex\V1\Content_SqlScript_QueryEngine::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php deleted file mode 100644 index 7738558c8804..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.dataplex.v1.CreateAssetRequest - */ -class CreateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset_id = ''; - /** - * Required. Asset resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Asset $asset Required. Asset resource. - * @param string $assetId Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * @return \Google\Cloud\Dataplex\V1\CreateAssetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Asset $asset, string $assetId): self - { - return (new self()) - ->setParent($parent) - ->setAsset($asset) - ->setAssetId($assetId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type string $asset_id - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * @type \Google\Cloud\Dataplex\V1\Asset $asset - * Required. Asset resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAssetId() - { - return $this->asset_id; - } - - /** - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - - /** - * Required. Asset resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Required. Asset resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php deleted file mode 100644 index b9f40119a99d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.dataplex.v1.CreateContentRequest - */ -class CreateContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Content resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $content = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * Please see {@see ContentServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Content $content Required. Content resource. - * - * @return \Google\Cloud\Dataplex\V1\CreateContentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Content $content): self - { - return (new self()) - ->setParent($parent) - ->setContent($content); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @type \Google\Cloud\Dataplex\V1\Content $content - * Required. Content resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * 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 name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * 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. Content resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Content|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * Required. Content resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Content $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content::class); - $this->content = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php deleted file mode 100644 index 02408fcac3c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - */ -class CreateDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_binding_id = ''; - /** - * Required. DataAttributeBinding resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_binding = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * Please see {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding Required. DataAttributeBinding resource. - * @param string $dataAttributeBindingId Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataAttributeBindingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding, string $dataAttributeBindingId): self - { - return (new self()) - ->setParent($parent) - ->setDataAttributeBinding($dataAttributeBinding) - ->setDataAttributeBindingId($dataAttributeBindingId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * @type string $data_attribute_binding_id - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * @type \Google\Cloud\Dataplex\V1\DataAttributeBinding $data_attribute_binding - * Required. DataAttributeBinding resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * - * 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 name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * - * 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. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataAttributeBindingId() - { - return $this->data_attribute_binding_id; - } - - /** - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataAttributeBindingId($var) - { - GPBUtil::checkString($var, True); - $this->data_attribute_binding_id = $var; - - return $this; - } - - /** - * Required. DataAttributeBinding resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding|null - */ - public function getDataAttributeBinding() - { - return $this->data_attribute_binding; - } - - public function hasDataAttributeBinding() - { - return isset($this->data_attribute_binding); - } - - public function clearDataAttributeBinding() - { - unset($this->data_attribute_binding); - } - - /** - * Required. DataAttributeBinding resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $var - * @return $this - */ - public function setDataAttributeBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); - $this->data_attribute_binding = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php deleted file mode 100644 index 62977dd678c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.dataplex.v1.CreateDataAttributeRequest - */ -class CreateDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_id = ''; - /** - * Required. DataAttribute resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute Required. DataAttribute resource. - * @param string $dataAttributeId Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataAttributeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute, string $dataAttributeId): self - { - return (new self()) - ->setParent($parent) - ->setDataAttribute($dataAttribute) - ->setDataAttributeId($dataAttributeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @type string $data_attribute_id - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * @type \Google\Cloud\Dataplex\V1\DataAttribute $data_attribute - * Required. DataAttribute resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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 name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataAttributeId() - { - return $this->data_attribute_id; - } - - /** - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataAttributeId($var) - { - GPBUtil::checkString($var, True); - $this->data_attribute_id = $var; - - return $this; - } - - /** - * Required. DataAttribute resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttribute|null - */ - public function getDataAttribute() - { - return $this->data_attribute; - } - - public function hasDataAttribute() - { - return isset($this->data_attribute); - } - - public function clearDataAttribute() - { - unset($this->data_attribute); - } - - /** - * Required. DataAttribute resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttribute $var - * @return $this - */ - public function setDataAttribute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttribute::class); - $this->data_attribute = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php deleted file mode 100644 index ff546cc358c2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.dataplex.v1.CreateDataScanRequest - */ -class CreateDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataScan resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_scan = null; - /** - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_scan_id = ''; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataScan $dataScan Required. DataScan resource. - * @param string $dataScanId Required. DataScan identifier. - * - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataScanRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataScan $dataScan, string $dataScanId): self - { - return (new self()) - ->setParent($parent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type \Google\Cloud\Dataplex\V1\DataScan $data_scan - * Required. DataScan resource. - * @type string $data_scan_id - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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 name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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. DataScan resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataScan|null - */ - public function getDataScan() - { - return $this->data_scan; - } - - public function hasDataScan() - { - return isset($this->data_scan); - } - - public function clearDataScan() - { - unset($this->data_scan); - } - - /** - * Required. DataScan resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataScan $var - * @return $this - */ - public function setDataScan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan::class); - $this->data_scan = $var; - - return $this; - } - - /** - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataScanId() - { - return $this->data_scan_id; - } - - /** - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataScanId($var) - { - GPBUtil::checkString($var, True); - $this->data_scan_id = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php deleted file mode 100644 index 6576b106053c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.dataplex.v1.CreateDataTaxonomyRequest - */ -class CreateDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_taxonomy_id = ''; - /** - * Required. DataTaxonomy resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_taxonomy = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy Required. DataTaxonomy resource. - * @param string $dataTaxonomyId Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataTaxonomyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy, string $dataTaxonomyId): self - { - return (new self()) - ->setParent($parent) - ->setDataTaxonomy($dataTaxonomy) - ->setDataTaxonomyId($dataTaxonomyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type string $data_taxonomy_id - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * @type \Google\Cloud\Dataplex\V1\DataTaxonomy $data_taxonomy - * Required. DataTaxonomy resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * 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 name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * 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. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataTaxonomyId() - { - return $this->data_taxonomy_id; - } - - /** - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataTaxonomyId($var) - { - GPBUtil::checkString($var, True); - $this->data_taxonomy_id = $var; - - return $this; - } - - /** - * Required. DataTaxonomy resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataTaxonomy|null - */ - public function getDataTaxonomy() - { - return $this->data_taxonomy; - } - - public function hasDataTaxonomy() - { - return isset($this->data_taxonomy); - } - - public function clearDataTaxonomy() - { - unset($this->data_taxonomy); - } - - /** - * Required. DataTaxonomy resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $var - * @return $this - */ - public function setDataTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); - $this->data_taxonomy = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php deleted file mode 100644 index a20402edd79a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.dataplex.v1.CreateEntityRequest - */ -class CreateEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see MetadataServiceClient::zoneName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Entity $entity Required. Entity resource. - * - * @return \Google\Cloud\Dataplex\V1\CreateEntityRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Entity $entity): self - { - return (new self()) - ->setParent($parent) - ->setEntity($entity); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type \Google\Cloud\Dataplex\V1\Entity $entity - * Required. Entity resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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. Entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Required. Entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php deleted file mode 100644 index 9c62503fb5e7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.dataplex.v1.CreateEnvironmentRequest - */ -class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment_id = ''; - /** - * Required. Environment resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Environment $environment Required. Environment resource. - * @param string $environmentId Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * @return \Google\Cloud\Dataplex\V1\CreateEnvironmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Environment $environment, string $environmentId): self - { - return (new self()) - ->setParent($parent) - ->setEnvironment($environment) - ->setEnvironmentId($environmentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @type string $environment_id - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * @type \Google\Cloud\Dataplex\V1\Environment $environment - * Required. Environment resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * 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. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEnvironmentId() - { - return $this->environment_id; - } - - /** - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEnvironmentId($var) - { - GPBUtil::checkString($var, True); - $this->environment_id = $var; - - return $this; - } - - /** - * Required. Environment resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Required. Environment resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php deleted file mode 100644 index 0a4f55da6883..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.CreateLakeRequest - */ -class CreateLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lake_id = ''; - /** - * Required. Lake resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lake = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see DataplexServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Lake $lake Required. Lake resource - * @param string $lakeId Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * @return \Google\Cloud\Dataplex\V1\CreateLakeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Lake $lake, string $lakeId): self - { - return (new self()) - ->setParent($parent) - ->setLake($lake) - ->setLakeId($lakeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type string $lake_id - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @type \Google\Cloud\Dataplex\V1\Lake $lake - * Required. Lake resource - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * 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 name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * 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. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLakeId() - { - return $this->lake_id; - } - - /** - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLakeId($var) - { - GPBUtil::checkString($var, True); - $this->lake_id = $var; - - return $this; - } - - /** - * Required. Lake resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Lake|null - */ - public function getLake() - { - return $this->lake; - } - - public function hasLake() - { - return isset($this->lake); - } - - public function clearLake() - { - unset($this->lake); - } - - /** - * Required. Lake resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Lake $var - * @return $this - */ - public function setLake($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake::class); - $this->lake = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php deleted file mode 100644 index 103aa8f21d19..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.dataplex.v1.CreatePartitionRequest - */ -class CreatePartitionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Partition resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $partition = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see - * {@see MetadataServiceClient::entityName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Partition $partition Required. Partition resource. - * - * @return \Google\Cloud\Dataplex\V1\CreatePartitionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Partition $partition): self - { - return (new self()) - ->setParent($parent) - ->setPartition($partition); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type \Google\Cloud\Dataplex\V1\Partition $partition - * Required. Partition resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * 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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * 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. Partition resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Partition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * Required. Partition resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Partition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Partition::class); - $this->partition = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php deleted file mode 100644 index 5fb51f83898d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dataplex.v1.CreateTaskRequest - */ -class CreateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Task identifier. - * - * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task_id = ''; - /** - * Required. Task resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Task $task Required. Task resource. - * @param string $taskId Required. Task identifier. - * - * @return \Google\Cloud\Dataplex\V1\CreateTaskRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Task $task, string $taskId): self - { - return (new self()) - ->setParent($parent) - ->setTask($task) - ->setTaskId($taskId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $task_id - * Required. Task identifier. - * @type \Google\Cloud\Dataplex\V1\Task $task - * Required. Task resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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. Task identifier. - * - * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTaskId() - { - return $this->task_id; - } - - /** - * Required. Task identifier. - * - * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTaskId($var) - { - GPBUtil::checkString($var, True); - $this->task_id = $var; - - return $this; - } - - /** - * Required. Task resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. Task resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task::class); - $this->task = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php deleted file mode 100644 index 6ef76089afec..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.CreateZoneRequest - */ -class CreateZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $zone_id = ''; - /** - * Required. Zone resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $zone = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Zone $zone Required. Zone resource. - * @param string $zoneId Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * @return \Google\Cloud\Dataplex\V1\CreateZoneRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Zone $zone, string $zoneId): self - { - return (new self()) - ->setParent($parent) - ->setZone($zone) - ->setZoneId($zoneId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $zone_id - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * @type \Google\Cloud\Dataplex\V1\Zone $zone - * Required. Zone resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getZoneId() - { - return $this->zone_id; - } - - /** - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setZoneId($var) - { - GPBUtil::checkString($var, True); - $this->zone_id = $var; - - return $this; - } - - /** - * Required. Zone resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Zone|null - */ - public function getZone() - { - return $this->zone; - } - - public function hasZone() - { - return isset($this->zone); - } - - public function clearZone() - { - unset($this->zone); - } - - /** - * Required. Zone resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Zone $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone::class); - $this->zone = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php deleted file mode 100644 index 7914ac8aa22a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.dataplex.v1.DataAccessSpec - */ -class DataAccessSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $readers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $readers - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Security::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReaders() - { - return $this->readers; - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->readers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php deleted file mode 100644 index 6e3eca726f5e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php +++ /dev/null @@ -1,530 +0,0 @@ -google.cloud.dataplex.v1.DataAttribute - */ -class DataAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataAttribute was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the DataAttribute was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the DataAttribute. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the DataAttribute. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * - * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $parent_id = ''; - /** - * Output only. The number of child attributes present for this attribute. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attribute_count = 0; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - */ - protected $etag = ''; - /** - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * - * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_access_spec = null; - /** - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_access_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * @type string $uid - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the DataAttribute was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the DataAttribute was last updated. - * @type string $description - * Optional. Description of the DataAttribute. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the DataAttribute. - * @type string $parent_id - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * @type int $attribute_count - * Output only. The number of child attributes present for this attribute. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type \Google\Cloud\Dataplex\V1\ResourceAccessSpec $resource_access_spec - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * @type \Google\Cloud\Dataplex\V1\DataAccessSpec $data_access_spec - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataAttribute was created. - * - * 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. The time when the DataAttribute was created. - * - * 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. The time when the DataAttribute was last updated. - * - * 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. The time when the DataAttribute was last updated. - * - * 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. Description of the DataAttribute. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the DataAttribute. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the DataAttribute. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the DataAttribute. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * - * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getParentId() - { - return $this->parent_id; - } - - /** - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * - * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParentId($var) - { - GPBUtil::checkString($var, True); - $this->parent_id = $var; - - return $this; - } - - /** - * Output only. The number of child attributes present for this attribute. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAttributeCount() - { - return $this->attribute_count; - } - - /** - * Output only. The number of child attributes present for this attribute. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAttributeCount($var) - { - GPBUtil::checkInt32($var); - $this->attribute_count = $var; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * - * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\ResourceAccessSpec|null - */ - public function getResourceAccessSpec() - { - return $this->resource_access_spec; - } - - public function hasResourceAccessSpec() - { - return isset($this->resource_access_spec); - } - - public function clearResourceAccessSpec() - { - unset($this->resource_access_spec); - } - - /** - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * - * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\ResourceAccessSpec $var - * @return $this - */ - public function setResourceAccessSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ResourceAccessSpec::class); - $this->resource_access_spec = $var; - - return $this; - } - - /** - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataAccessSpec|null - */ - public function getDataAccessSpec() - { - return $this->data_access_spec; - } - - public function hasDataAccessSpec() - { - return isset($this->data_access_spec); - } - - public function clearDataAccessSpec() - { - unset($this->data_access_spec); - } - - /** - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataAccessSpec $var - * @return $this - */ - public function setDataAccessSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAccessSpec::class); - $this->data_access_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php deleted file mode 100644 index 0b04d11921e0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php +++ /dev/null @@ -1,492 +0,0 @@ -google.cloud.dataplex.v1.DataAttributeBinding - */ -class DataAttributeBinding extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataAttributeBinding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the DataAttributeBinding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the DataAttributeBinding. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the DataAttributeBinding. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * - * Generated from protobuf field string etag = 8; - */ - protected $etag = ''; - /** - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $attributes; - /** - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $paths; - protected $resource_reference; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * @type string $uid - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the DataAttributeBinding was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the DataAttributeBinding was last updated. - * @type string $description - * Optional. Description of the DataAttributeBinding. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the DataAttributeBinding. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * @type string $resource - * Optional. Immutable. The resource name of the resource that is associated - * to attributes. Presently, only entity resource is supported in the form: - * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} - * Must belong in the same project and region as the attribute binding, and - * there can only exist one active binding for a resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $attributes - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @type array<\Google\Cloud\Dataplex\V1\DataAttributeBinding\Path>|\Google\Protobuf\Internal\RepeatedField $paths - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataAttributeBinding was created. - * - * 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. The time when the DataAttributeBinding was created. - * - * 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. The time when the DataAttributeBinding was last updated. - * - * 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. The time when the DataAttributeBinding was last updated. - * - * 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. Description of the DataAttributeBinding. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the DataAttributeBinding. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the DataAttributeBinding. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the DataAttributeBinding. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * - * Generated from protobuf field string etag = 8; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * - * Generated from protobuf field string etag = 8; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Immutable. The resource name of the resource that is associated - * to attributes. Presently, only entity resource is supported in the form: - * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} - * Must belong in the same project and region as the attribute binding, and - * there can only exist one active binding for a resource. - * - * Generated from protobuf field string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResource() - { - return $this->readOneof(100); - } - - public function hasResource() - { - return $this->hasOneof(100); - } - - /** - * Optional. Immutable. The resource name of the resource that is associated - * to attributes. Presently, only entity resource is supported in the form: - * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} - * Must belong in the same project and region as the attribute binding, and - * there can only exist one active binding for a resource. - * - * Generated from protobuf field string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->attributes = $arr; - - return $this; - } - - /** - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\DataAttributeBinding\Path>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttributeBinding\Path::class); - $this->paths = $arr; - - return $this; - } - - /** - * @return string - */ - public function getResourceReference() - { - return $this->whichOneof("resource_reference"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php deleted file mode 100644 index ea8acf4f071e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dataplex.v1.DataAttributeBinding.Path - */ -class Path extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $attributes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * @type array|\Google\Protobuf\Internal\RepeatedField $attributes - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * - * 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; - } - - /** - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->attributes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Path::class, \Google\Cloud\Dataplex\V1\DataAttributeBinding_Path::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php deleted file mode 100644 index ec707235fd6c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult - */ -class DataProfileResult extends \Google\Protobuf\Internal\Message -{ - /** - * The count of rows scanned. - * - * Generated from protobuf field int64 row_count = 3; - */ - protected $row_count = 0; - /** - * The profile information per field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - */ - protected $profile = null; - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - */ - protected $scanned_data = null; - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $post_scan_actions_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $row_count - * The count of rows scanned. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile $profile - * The profile information per field. - * @type \Google\Cloud\Dataplex\V1\ScannedData $scanned_data - * The data scanned for this result. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult $post_scan_actions_result - * Output only. The result of post scan actions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * The count of rows scanned. - * - * Generated from protobuf field int64 row_count = 3; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows scanned. - * - * Generated from protobuf field int64 row_count = 3; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * The profile information per field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile|null - */ - public function getProfile() - { - return $this->profile; - } - - public function hasProfile() - { - return isset($this->profile); - } - - public function clearProfile() - { - unset($this->profile); - } - - /** - * The profile information per field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile::class); - $this->profile = $var; - - return $this; - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - * @return \Google\Cloud\Dataplex\V1\ScannedData|null - */ - public function getScannedData() - { - return $this->scanned_data; - } - - public function hasScannedData() - { - return isset($this->scanned_data); - } - - public function clearScannedData() - { - unset($this->scanned_data); - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - * @param \Google\Cloud\Dataplex\V1\ScannedData $var - * @return $this - */ - public function setScannedData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData::class); - $this->scanned_data = $var; - - return $this; - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult|null - */ - public function getPostScanActionsResult() - { - return $this->post_scan_actions_result; - } - - public function hasPostScanActionsResult() - { - return isset($this->post_scan_actions_result); - } - - public function clearPostScanActionsResult() - { - unset($this->post_scan_actions_result); - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult $var - * @return $this - */ - public function setPostScanActionsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult::class); - $this->post_scan_actions_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php deleted file mode 100644 index 9079ae4ede3d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - */ -class PostScanActionsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bigquery_export_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult $bigquery_export_result - * Output only. The result of BigQuery export post scan action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult|null - */ - public function getBigqueryExportResult() - { - return $this->bigquery_export_result; - } - - public function hasBigqueryExportResult() - { - return isset($this->bigquery_export_result); - } - - public function clearBigqueryExportResult() - { - unset($this->bigquery_export_result); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult $var - * @return $this - */ - public function setBigqueryExportResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult::class); - $this->bigquery_export_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php deleted file mode 100644 index 27ad4e98a6b0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - */ -class BigQueryExportResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Execution state for the BigQuery exporting. - * @type string $message - * Output only. Additional information about the BigQuery exporting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult_BigQueryExportResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php deleted file mode 100644 index 9b25526359e4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State - */ -class State -{ - /** - * The exporting state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The exporting completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * The exporting is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The exporting is skipped due to no valid scan result to export - * (usually caused by scan failed). - * - * Generated from protobuf enum SKIPPED = 3; - */ - const SKIPPED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::SKIPPED => 'SKIPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult_BigQueryExportResult_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php deleted file mode 100644 index d65af5ea5427..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile - */ -class Profile extends \Google\Protobuf\Internal\Message -{ - /** - * List of fields with structural and profile information for each field. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field>|\Google\Protobuf\Internal\RepeatedField $fields - * List of fields with structural and profile information for each field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * List of fields with structural and profile information for each field. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * List of fields with structural and profile information for each field. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; - * @param array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Profile::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php deleted file mode 100644 index f54274be71f4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the field. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * - * Generated from protobuf field string mode = 3; - */ - protected $mode = ''; - /** - * Profile information for the corresponding field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; - */ - protected $profile = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the field. - * @type string $type - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * @type string $mode - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $profile - * Profile information for the corresponding field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * The name of the field. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the field. - * - * 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; - } - - /** - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * - * Generated from protobuf field string mode = 3; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * - * Generated from protobuf field string mode = 3; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Profile information for the corresponding field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo|null - */ - public function getProfile() - { - return $this->profile; - } - - public function hasProfile() - { - return isset($this->profile); - } - - public function clearProfile() - { - unset($this->profile); - } - - /** - * Profile information for the corresponding field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo::class); - $this->profile = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Field::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php deleted file mode 100644 index 87b2797462ae..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php +++ /dev/null @@ -1,270 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - */ -class ProfileInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Ratio of rows with null value against total scanned rows. - * - * Generated from protobuf field double null_ratio = 2; - */ - protected $null_ratio = 0.0; - /** - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * - * Generated from protobuf field double distinct_ratio = 3; - */ - protected $distinct_ratio = 0.0; - /** - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; - */ - private $top_n_values; - protected $field_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $null_ratio - * Ratio of rows with null value against total scanned rows. - * @type float $distinct_ratio - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * @type array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue>|\Google\Protobuf\Internal\RepeatedField $top_n_values - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo $string_profile - * String type field information. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo $integer_profile - * Integer type field information. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo $double_profile - * Double type field information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Ratio of rows with null value against total scanned rows. - * - * Generated from protobuf field double null_ratio = 2; - * @return float - */ - public function getNullRatio() - { - return $this->null_ratio; - } - - /** - * Ratio of rows with null value against total scanned rows. - * - * Generated from protobuf field double null_ratio = 2; - * @param float $var - * @return $this - */ - public function setNullRatio($var) - { - GPBUtil::checkDouble($var); - $this->null_ratio = $var; - - return $this; - } - - /** - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * - * Generated from protobuf field double distinct_ratio = 3; - * @return float - */ - public function getDistinctRatio() - { - return $this->distinct_ratio; - } - - /** - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * - * Generated from protobuf field double distinct_ratio = 3; - * @param float $var - * @return $this - */ - public function setDistinctRatio($var) - { - GPBUtil::checkDouble($var); - $this->distinct_ratio = $var; - - return $this; - } - - /** - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTopNValues() - { - return $this->top_n_values; - } - - /** - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; - * @param array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTopNValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue::class); - $this->top_n_values = $arr; - - return $this; - } - - /** - * String type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo string_profile = 101; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo|null - */ - public function getStringProfile() - { - return $this->readOneof(101); - } - - public function hasStringProfile() - { - return $this->hasOneof(101); - } - - /** - * String type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo string_profile = 101; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo $var - * @return $this - */ - public function setStringProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Integer type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo integer_profile = 102; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo|null - */ - public function getIntegerProfile() - { - return $this->readOneof(102); - } - - public function hasIntegerProfile() - { - return $this->hasOneof(102); - } - - /** - * Integer type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo integer_profile = 102; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo $var - * @return $this - */ - public function setIntegerProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Double type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo double_profile = 103; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo|null - */ - public function getDoubleProfile() - { - return $this->readOneof(103); - } - - public function hasDoubleProfile() - { - return $this->hasOneof(103); - } - - /** - * Double type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo double_profile = 103; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo $var - * @return $this - */ - public function setDoubleProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * @return string - */ - public function getFieldInfo() - { - return $this->whichOneof("field_info"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProfileInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php deleted file mode 100644 index ad1f6ba21fdd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - */ -class DoubleFieldInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - */ - protected $average = 0.0; - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - */ - protected $standard_deviation = 0.0; - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double min = 4; - */ - protected $min = 0.0; - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * - * Generated from protobuf field repeated double quartiles = 6; - */ - private $quartiles; - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double max = 5; - */ - protected $max = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $average - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type float $standard_deviation - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * @type float $min - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type array|\Google\Protobuf\Internal\RepeatedField $quartiles - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * @type float $max - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @return float - */ - public function getAverage() - { - return $this->average; - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @param float $var - * @return $this - */ - public function setAverage($var) - { - GPBUtil::checkDouble($var); - $this->average = $var; - - return $this; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @return float - */ - public function getStandardDeviation() - { - return $this->standard_deviation; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @param float $var - * @return $this - */ - public function setStandardDeviation($var) - { - GPBUtil::checkDouble($var); - $this->standard_deviation = $var; - - return $this; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double min = 4; - * @return float - */ - public function getMin() - { - return $this->min; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double min = 4; - * @param float $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkDouble($var); - $this->min = $var; - - return $this; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * - * Generated from protobuf field repeated double quartiles = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuartiles() - { - return $this->quartiles; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * - * Generated from protobuf field repeated double quartiles = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuartiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->quartiles = $arr; - - return $this; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double max = 5; - * @return float - */ - public function getMax() - { - return $this->max; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double max = 5; - * @param float $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkDouble($var); - $this->max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DoubleFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php deleted file mode 100644 index c0cfc703d405..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php +++ /dev/null @@ -1,266 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - */ -class IntegerFieldInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - */ - protected $average = 0.0; - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - */ - protected $standard_deviation = 0.0; - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 min = 4; - */ - protected $min = 0; - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * - * Generated from protobuf field repeated int64 quartiles = 6; - */ - private $quartiles; - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 max = 5; - */ - protected $max = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $average - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type float $standard_deviation - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * @type int|string $min - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type array|array|\Google\Protobuf\Internal\RepeatedField $quartiles - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * @type int|string $max - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @return float - */ - public function getAverage() - { - return $this->average; - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @param float $var - * @return $this - */ - public function setAverage($var) - { - GPBUtil::checkDouble($var); - $this->average = $var; - - return $this; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @return float - */ - public function getStandardDeviation() - { - return $this->standard_deviation; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @param float $var - * @return $this - */ - public function setStandardDeviation($var) - { - GPBUtil::checkDouble($var); - $this->standard_deviation = $var; - - return $this; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 min = 4; - * @return int|string - */ - public function getMin() - { - return $this->min; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 min = 4; - * @param int|string $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkInt64($var); - $this->min = $var; - - return $this; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * - * Generated from protobuf field repeated int64 quartiles = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuartiles() - { - return $this->quartiles; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * - * Generated from protobuf field repeated int64 quartiles = 6; - * @param array|array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuartiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); - $this->quartiles = $arr; - - return $this; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 max = 5; - * @return int|string - */ - public function getMax() - { - return $this->max; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 max = 5; - * @param int|string $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkInt64($var); - $this->max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntegerFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php deleted file mode 100644 index b1dc69020a8f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - */ -class StringFieldInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Minimum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 min_length = 1; - */ - protected $min_length = 0; - /** - * Maximum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 max_length = 2; - */ - protected $max_length = 0; - /** - * Average length of non-null values in the scanned data. - * - * Generated from protobuf field double average_length = 3; - */ - protected $average_length = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $min_length - * Minimum length of non-null values in the scanned data. - * @type int|string $max_length - * Maximum length of non-null values in the scanned data. - * @type float $average_length - * Average length of non-null values in the scanned data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Minimum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 min_length = 1; - * @return int|string - */ - public function getMinLength() - { - return $this->min_length; - } - - /** - * Minimum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 min_length = 1; - * @param int|string $var - * @return $this - */ - public function setMinLength($var) - { - GPBUtil::checkInt64($var); - $this->min_length = $var; - - return $this; - } - - /** - * Maximum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 max_length = 2; - * @return int|string - */ - public function getMaxLength() - { - return $this->max_length; - } - - /** - * Maximum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 max_length = 2; - * @param int|string $var - * @return $this - */ - public function setMaxLength($var) - { - GPBUtil::checkInt64($var); - $this->max_length = $var; - - return $this; - } - - /** - * Average length of non-null values in the scanned data. - * - * Generated from protobuf field double average_length = 3; - * @return float - */ - public function getAverageLength() - { - return $this->average_length; - } - - /** - * Average length of non-null values in the scanned data. - * - * Generated from protobuf field double average_length = 3; - * @param float $var - * @return $this - */ - public function setAverageLength($var) - { - GPBUtil::checkDouble($var); - $this->average_length = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StringFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php deleted file mode 100644 index 52c084f07d58..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - */ -class TopNValue extends \Google\Protobuf\Internal\Message -{ - /** - * String value of a top N non-null value. - * - * Generated from protobuf field string value = 1; - */ - protected $value = ''; - /** - * Count of the corresponding value in the scanned data. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - /** - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * - * Generated from protobuf field double ratio = 3; - */ - protected $ratio = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * String value of a top N non-null value. - * @type int|string $count - * Count of the corresponding value in the scanned data. - * @type float $ratio - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * String value of a top N non-null value. - * - * Generated from protobuf field string value = 1; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * String value of a top N non-null value. - * - * Generated from protobuf field string value = 1; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Count of the corresponding value in the scanned data. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Count of the corresponding value in the scanned data. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * - * Generated from protobuf field double ratio = 3; - * @return float - */ - public function getRatio() - { - return $this->ratio; - } - - /** - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * - * Generated from protobuf field double ratio = 3; - * @param float $var - * @return $this - */ - public function setRatio($var) - { - GPBUtil::checkDouble($var); - $this->ratio = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TopNValue::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_TopNValue::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php deleted file mode 100644 index 9451a8623510..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec - */ -class DataProfileSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sampling_percent = 0.0; - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $row_filter = ''; - /** - * Optional. Actions to take upon job completion.. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $post_scan_actions = null; - /** - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_fields = null; - /** - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $exclude_fields = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_percent - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * @type string $row_filter - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions $post_scan_actions - * Optional. Actions to take upon job completion.. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $include_fields - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $exclude_fields - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRowFilter() - { - return $this->row_filter; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRowFilter($var) - { - GPBUtil::checkString($var, True); - $this->row_filter = $var; - - return $this; - } - - /** - * Optional. Actions to take upon job completion.. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions|null - */ - public function getPostScanActions() - { - return $this->post_scan_actions; - } - - public function hasPostScanActions() - { - return isset($this->post_scan_actions); - } - - public function clearPostScanActions() - { - unset($this->post_scan_actions); - } - - /** - * Optional. Actions to take upon job completion.. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions $var - * @return $this - */ - public function setPostScanActions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions::class); - $this->post_scan_actions = $var; - - return $this; - } - - /** - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields|null - */ - public function getIncludeFields() - { - return $this->include_fields; - } - - public function hasIncludeFields() - { - return isset($this->include_fields); - } - - public function clearIncludeFields() - { - unset($this->include_fields); - } - - /** - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $var - * @return $this - */ - public function setIncludeFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields::class); - $this->include_fields = $var; - - return $this; - } - - /** - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields|null - */ - public function getExcludeFields() - { - return $this->exclude_fields; - } - - public function hasExcludeFields() - { - return isset($this->exclude_fields); - } - - public function clearExcludeFields() - { - unset($this->exclude_fields); - } - - /** - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $var - * @return $this - */ - public function setExcludeFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields::class); - $this->exclude_fields = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php deleted file mode 100644 index c6c1e01f3466..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - */ -class PostScanActions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bigquery_export = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport $bigquery_export - * Optional. If set, results will be exported to the provided BigQuery - * table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport|null - */ - public function getBigqueryExport() - { - return $this->bigquery_export; - } - - public function hasBigqueryExport() - { - return isset($this->bigquery_export); - } - - public function clearBigqueryExport() - { - unset($this->bigquery_export); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport $var - * @return $this - */ - public function setBigqueryExport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport::class); - $this->bigquery_export = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActions::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_PostScanActions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php deleted file mode 100644 index 55cc182ed0f5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - */ -class BigQueryExport extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $results_table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $results_table - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResultsTable() - { - return $this->results_table; - } - - /** - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResultsTable($var) - { - GPBUtil::checkString($var, True); - $this->results_table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExport::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_PostScanActions_BigQueryExport::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php deleted file mode 100644 index f69dc8885de9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - */ -class SelectedFields extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * - * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $field_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $field_names - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * - * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldNames() - { - return $this->field_names; - } - - /** - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * - * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->field_names = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelectedFields::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_SelectedFields::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php deleted file mode 100644 index dbc14cbdc2de..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dataplex.v1.DataQualityDimension - */ -class DataQualityDimension extends \Google\Protobuf\Internal\Message -{ - /** - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * - * 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; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php deleted file mode 100644 index bc114bb69356..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.DataQualityDimensionResult - */ -class DataQualityDimensionResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The dimension config specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dimension = null; - /** - * Whether the dimension passed or failed. - * - * Generated from protobuf field bool passed = 3; - */ - protected $passed = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityDimension $dimension - * Output only. The dimension config specified in the DataQualitySpec, as is. - * @type bool $passed - * Whether the dimension passed or failed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The dimension config specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityDimension|null - */ - public function getDimension() - { - return $this->dimension; - } - - public function hasDimension() - { - return isset($this->dimension); - } - - public function clearDimension() - { - unset($this->dimension); - } - - /** - * Output only. The dimension config specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityDimension $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityDimension::class); - $this->dimension = $var; - - return $this; - } - - /** - * Whether the dimension passed or failed. - * - * Generated from protobuf field bool passed = 3; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Whether the dimension passed or failed. - * - * Generated from protobuf field bool passed = 3; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php deleted file mode 100644 index eb9f4e4c1616..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult - */ -class DataQualityResult extends \Google\Protobuf\Internal\Message -{ - /** - * Overall data quality result -- `true` if all rules passed. - * - * Generated from protobuf field bool passed = 5; - */ - protected $passed = false; - /** - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; - */ - private $dimensions; - /** - * A list of all the rules in a job, and their results. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; - */ - private $rules; - /** - * The count of rows processed. - * - * Generated from protobuf field int64 row_count = 4; - */ - protected $row_count = 0; - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; - */ - protected $scanned_data = null; - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $post_scan_actions_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $passed - * Overall data quality result -- `true` if all rules passed. - * @type array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $dimensions - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * @type array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $rules - * A list of all the rules in a job, and their results. - * @type int|string $row_count - * The count of rows processed. - * @type \Google\Cloud\Dataplex\V1\ScannedData $scanned_data - * The data scanned for this result. - * @type \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult $post_scan_actions_result - * Output only. The result of post scan actions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Overall data quality result -- `true` if all rules passed. - * - * Generated from protobuf field bool passed = 5; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Overall data quality result -- `true` if all rules passed. - * - * Generated from protobuf field bool passed = 5; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - - /** - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDimensions() - { - return $this->dimensions; - } - - /** - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDimensions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityDimensionResult::class); - $this->dimensions = $arr; - - return $this; - } - - /** - * A list of all the rules in a job, and their results. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * A list of all the rules in a job, and their results. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRuleResult::class); - $this->rules = $arr; - - return $this; - } - - /** - * The count of rows processed. - * - * Generated from protobuf field int64 row_count = 4; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows processed. - * - * Generated from protobuf field int64 row_count = 4; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; - * @return \Google\Cloud\Dataplex\V1\ScannedData|null - */ - public function getScannedData() - { - return $this->scanned_data; - } - - public function hasScannedData() - { - return isset($this->scanned_data); - } - - public function clearScannedData() - { - unset($this->scanned_data); - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; - * @param \Google\Cloud\Dataplex\V1\ScannedData $var - * @return $this - */ - public function setScannedData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData::class); - $this->scanned_data = $var; - - return $this; - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult|null - */ - public function getPostScanActionsResult() - { - return $this->post_scan_actions_result; - } - - public function hasPostScanActionsResult() - { - return isset($this->post_scan_actions_result); - } - - public function clearPostScanActionsResult() - { - unset($this->post_scan_actions_result); - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult $var - * @return $this - */ - public function setPostScanActionsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult::class); - $this->post_scan_actions_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php deleted file mode 100644 index 2b58624056bc..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - */ -class PostScanActionsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bigquery_export_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult $bigquery_export_result - * Output only. The result of BigQuery export post scan action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult|null - */ - public function getBigqueryExportResult() - { - return $this->bigquery_export_result; - } - - public function hasBigqueryExportResult() - { - return isset($this->bigquery_export_result); - } - - public function clearBigqueryExportResult() - { - unset($this->bigquery_export_result); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult $var - * @return $this - */ - public function setBigqueryExportResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult::class); - $this->bigquery_export_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php deleted file mode 100644 index 8f4f124efb15..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - */ -class BigQueryExportResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Execution state for the BigQuery exporting. - * @type string $message - * Output only. Additional information about the BigQuery exporting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult_BigQueryExportResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php deleted file mode 100644 index 39f3c3bedfa3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State - */ -class State -{ - /** - * The exporting state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The exporting completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * The exporting is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The exporting is skipped due to no valid scan result to export - * (usually caused by scan failed). - * - * Generated from protobuf enum SKIPPED = 3; - */ - const SKIPPED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::SKIPPED => 'SKIPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult_BigQueryExportResult_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php deleted file mode 100644 index c01add91b263..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php +++ /dev/null @@ -1,584 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule - */ -class DataQualityRule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unnested column which this rule is evaluated against. - * - * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $column = ''; - /** - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_null = false; - /** - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * - * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dimension = ''; - /** - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $threshold = 0.0; - /** - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * - * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 505 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - protected $rule_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation $range_expectation - * Row-level rule which evaluates whether each column value lies between a - * specified range. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation $non_null_expectation - * Row-level rule which evaluates whether each column value is null. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation $set_expectation - * Row-level rule which evaluates whether each column value is contained by - * a specified set. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation $regex_expectation - * Row-level rule which evaluates whether each column value matches a - * specified regex. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation $uniqueness_expectation - * Row-level rule which evaluates whether each column value is unique. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation $statistic_range_expectation - * Aggregate rule which evaluates whether the column aggregate - * statistic lies between a specified range. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation $row_condition_expectation - * Row-level rule which evaluates whether each row in a table passes the - * specified condition. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $table_condition_expectation - * Aggregate rule which evaluates whether the provided expression is true - * for a table. - * @type string $column - * Optional. The unnested column which this rule is evaluated against. - * @type bool $ignore_null - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for row-level type rules. - * @type string $dimension - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * @type float $threshold - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * @type string $name - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * @type string $description - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Row-level rule which evaluates whether each column value lies between a - * specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation|null - */ - public function getRangeExpectation() - { - return $this->readOneof(1); - } - - public function hasRangeExpectation() - { - return $this->hasOneof(1); - } - - /** - * Row-level rule which evaluates whether each column value lies between a - * specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation $var - * @return $this - */ - public function setRangeExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value is null. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation|null - */ - public function getNonNullExpectation() - { - return $this->readOneof(2); - } - - public function hasNonNullExpectation() - { - return $this->hasOneof(2); - } - - /** - * Row-level rule which evaluates whether each column value is null. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation $var - * @return $this - */ - public function setNonNullExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value is contained by - * a specified set. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation|null - */ - public function getSetExpectation() - { - return $this->readOneof(3); - } - - public function hasSetExpectation() - { - return $this->hasOneof(3); - } - - /** - * Row-level rule which evaluates whether each column value is contained by - * a specified set. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation $var - * @return $this - */ - public function setSetExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value matches a - * specified regex. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation|null - */ - public function getRegexExpectation() - { - return $this->readOneof(4); - } - - public function hasRegexExpectation() - { - return $this->hasOneof(4); - } - - /** - * Row-level rule which evaluates whether each column value matches a - * specified regex. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation $var - * @return $this - */ - public function setRegexExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value is unique. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation|null - */ - public function getUniquenessExpectation() - { - return $this->readOneof(100); - } - - public function hasUniquenessExpectation() - { - return $this->hasOneof(100); - } - - /** - * Row-level rule which evaluates whether each column value is unique. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation $var - * @return $this - */ - public function setUniquenessExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Aggregate rule which evaluates whether the column aggregate - * statistic lies between a specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation|null - */ - public function getStatisticRangeExpectation() - { - return $this->readOneof(101); - } - - public function hasStatisticRangeExpectation() - { - return $this->hasOneof(101); - } - - /** - * Aggregate rule which evaluates whether the column aggregate - * statistic lies between a specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation $var - * @return $this - */ - public function setStatisticRangeExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each row in a table passes the - * specified condition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation|null - */ - public function getRowConditionExpectation() - { - return $this->readOneof(200); - } - - public function hasRowConditionExpectation() - { - return $this->hasOneof(200); - } - - /** - * Row-level rule which evaluates whether each row in a table passes the - * specified condition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation $var - * @return $this - */ - public function setRowConditionExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * Aggregate rule which evaluates whether the provided expression is true - * for a table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation|null - */ - public function getTableConditionExpectation() - { - return $this->readOneof(201); - } - - public function hasTableConditionExpectation() - { - return $this->hasOneof(201); - } - - /** - * Aggregate rule which evaluates whether the provided expression is true - * for a table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $var - * @return $this - */ - public function setTableConditionExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * Optional. The unnested column which this rule is evaluated against. - * - * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * Optional. The unnested column which this rule is evaluated against. - * - * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreNull() - { - return $this->ignore_null; - } - - /** - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreNull($var) - { - GPBUtil::checkBool($var); - $this->ignore_null = $var; - - return $this; - } - - /** - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * - * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDimension() - { - return $this->dimension; - } - - /** - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * - * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkString($var, True); - $this->dimension = $var; - - return $this; - } - - /** - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getThreshold() - { - return $this->threshold; - } - - /** - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setThreshold($var) - { - GPBUtil::checkDouble($var); - $this->threshold = $var; - - return $this; - } - - /** - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * - * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * - * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 505 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 505 [(.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 getRuleType() - { - return $this->whichOneof("rule_type"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php deleted file mode 100644 index a3895598790a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - */ -class NonNullExpectation extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NonNullExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_NonNullExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php deleted file mode 100644 index f61b5edb63f3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - */ -class RangeExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_value = ''; - /** - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_value = ''; - /** - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_min_enabled = false; - /** - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_max_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $min_value - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * @type string $max_value - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * @type bool $strict_min_enabled - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * @type bool $strict_max_enabled - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMinValue() - { - return $this->min_value; - } - - /** - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkString($var, True); - $this->min_value = $var; - - return $this; - } - - /** - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMaxValue() - { - return $this->max_value; - } - - /** - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkString($var, True); - $this->max_value = $var; - - return $this; - } - - /** - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMinEnabled() - { - return $this->strict_min_enabled; - } - - /** - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMinEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_min_enabled = $var; - - return $this; - } - - /** - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMaxEnabled() - { - return $this->strict_max_enabled; - } - - /** - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMaxEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_max_enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RangeExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RangeExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php deleted file mode 100644 index 0c063eb2e522..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - */ -class RegexExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A regular expression the column value is expected to match. - * - * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $regex = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $regex - * Optional. A regular expression the column value is expected to match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A regular expression the column value is expected to match. - * - * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegex() - { - return $this->regex; - } - - /** - * Optional. A regular expression the column value is expected to match. - * - * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegex($var) - { - GPBUtil::checkString($var, True); - $this->regex = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RegexExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RegexExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php deleted file mode 100644 index 375eb693638f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php +++ /dev/null @@ -1,73 +0,0 @@ -= 0 AND col2 < 10 - * - * Generated from protobuf message google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - */ -class RowConditionExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sql_expression = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sql_expression - * Optional. The SQL expression. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSqlExpression() - { - return $this->sql_expression; - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSqlExpression($var) - { - GPBUtil::checkString($var, True); - $this->sql_expression = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RowConditionExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RowConditionExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php deleted file mode 100644 index 2d2df81627f5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.SetExpectation - */ -class SetExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Expected values for the column value. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Optional. Expected values for the column value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Expected values for the column value. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Optional. Expected values for the column value. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SetExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_SetExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php deleted file mode 100644 index 0712f1d292f8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - */ -class StatisticRangeExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The aggregate metric to evaluate. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $statistic = 0; - /** - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_value = ''; - /** - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_value = ''; - /** - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_min_enabled = false; - /** - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_max_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $statistic - * Optional. The aggregate metric to evaluate. - * @type string $min_value - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * @type string $max_value - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * @type bool $strict_min_enabled - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * @type bool $strict_max_enabled - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The aggregate metric to evaluate. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getStatistic() - { - return $this->statistic; - } - - /** - * Optional. The aggregate metric to evaluate. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setStatistic($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation\ColumnStatistic::class); - $this->statistic = $var; - - return $this; - } - - /** - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMinValue() - { - return $this->min_value; - } - - /** - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkString($var, True); - $this->min_value = $var; - - return $this; - } - - /** - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMaxValue() - { - return $this->max_value; - } - - /** - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkString($var, True); - $this->max_value = $var; - - return $this; - } - - /** - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMinEnabled() - { - return $this->strict_min_enabled; - } - - /** - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMinEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_min_enabled = $var; - - return $this; - } - - /** - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMaxEnabled() - { - return $this->strict_max_enabled; - } - - /** - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMaxEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_max_enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StatisticRangeExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_StatisticRangeExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php deleted file mode 100644 index 6ae805f5de91..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic - */ -class ColumnStatistic -{ - /** - * Unspecified statistic type - * - * Generated from protobuf enum STATISTIC_UNDEFINED = 0; - */ - const STATISTIC_UNDEFINED = 0; - /** - * Evaluate the column mean - * - * Generated from protobuf enum MEAN = 1; - */ - const MEAN = 1; - /** - * Evaluate the column min - * - * Generated from protobuf enum MIN = 2; - */ - const MIN = 2; - /** - * Evaluate the column max - * - * Generated from protobuf enum MAX = 3; - */ - const MAX = 3; - - private static $valueToName = [ - self::STATISTIC_UNDEFINED => 'STATISTIC_UNDEFINED', - self::MEAN => 'MEAN', - self::MIN => 'MIN', - self::MAX => 'MAX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ColumnStatistic::class, \Google\Cloud\Dataplex\V1\DataQualityRule_StatisticRangeExpectation_ColumnStatistic::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php deleted file mode 100644 index e0c173a4c08b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php +++ /dev/null @@ -1,73 +0,0 @@ -= 0 - * - * Generated from protobuf message google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - */ -class TableConditionExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sql_expression = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sql_expression - * Optional. The SQL expression. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSqlExpression() - { - return $this->sql_expression; - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSqlExpression($var) - { - GPBUtil::checkString($var, True); - $this->sql_expression = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableConditionExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_TableConditionExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php deleted file mode 100644 index b8303790ed89..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - */ -class UniquenessExpectation extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UniquenessExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_UniquenessExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php deleted file mode 100644 index 729cc8beea99..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRuleResult - */ -class DataQualityRuleResult extends \Google\Protobuf\Internal\Message -{ - /** - * The rule specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; - */ - protected $rule = null; - /** - * Whether the rule passed or failed. - * - * Generated from protobuf field bool passed = 7; - */ - protected $passed = false; - /** - * The number of rows a rule was evaluated against. - * This field is only valid for row-level type rules. - * Evaluated count can be configured to either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * - * Generated from protobuf field int64 evaluated_count = 9; - */ - protected $evaluated_count = 0; - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field int64 passed_count = 8; - */ - protected $passed_count = 0; - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_count = 5; - */ - protected $null_count = 0; - /** - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double pass_ratio = 6; - */ - protected $pass_ratio = 0.0; - /** - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field string failing_rows_query = 10; - */ - protected $failing_rows_query = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityRule $rule - * The rule specified in the DataQualitySpec, as is. - * @type bool $passed - * Whether the rule passed or failed. - * @type int|string $evaluated_count - * The number of rows a rule was evaluated against. - * This field is only valid for row-level type rules. - * Evaluated count can be configured to either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * @type int|string $passed_count - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * @type int|string $null_count - * The number of rows with null values in the specified column. - * @type float $pass_ratio - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * @type string $failing_rows_query - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * The rule specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule|null - */ - public function getRule() - { - return $this->rule; - } - - public function hasRule() - { - return isset($this->rule); - } - - public function clearRule() - { - unset($this->rule); - } - - /** - * The rule specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule $var - * @return $this - */ - public function setRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule::class); - $this->rule = $var; - - return $this; - } - - /** - * Whether the rule passed or failed. - * - * Generated from protobuf field bool passed = 7; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Whether the rule passed or failed. - * - * Generated from protobuf field bool passed = 7; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - - /** - * The number of rows a rule was evaluated against. - * This field is only valid for row-level type rules. - * Evaluated count can be configured to either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * - * Generated from protobuf field int64 evaluated_count = 9; - * @return int|string - */ - public function getEvaluatedCount() - { - return $this->evaluated_count; - } - - /** - * The number of rows a rule was evaluated against. - * This field is only valid for row-level type rules. - * Evaluated count can be configured to either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * - * Generated from protobuf field int64 evaluated_count = 9; - * @param int|string $var - * @return $this - */ - public function setEvaluatedCount($var) - { - GPBUtil::checkInt64($var); - $this->evaluated_count = $var; - - return $this; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field int64 passed_count = 8; - * @return int|string - */ - public function getPassedCount() - { - return $this->passed_count; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field int64 passed_count = 8; - * @param int|string $var - * @return $this - */ - public function setPassedCount($var) - { - GPBUtil::checkInt64($var); - $this->passed_count = $var; - - return $this; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_count = 5; - * @return int|string - */ - public function getNullCount() - { - return $this->null_count; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_count = 5; - * @param int|string $var - * @return $this - */ - public function setNullCount($var) - { - GPBUtil::checkInt64($var); - $this->null_count = $var; - - return $this; - } - - /** - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double pass_ratio = 6; - * @return float - */ - public function getPassRatio() - { - return $this->pass_ratio; - } - - /** - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double pass_ratio = 6; - * @param float $var - * @return $this - */ - public function setPassRatio($var) - { - GPBUtil::checkDouble($var); - $this->pass_ratio = $var; - - return $this; - } - - /** - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field string failing_rows_query = 10; - * @return string - */ - public function getFailingRowsQuery() - { - return $this->failing_rows_query; - } - - /** - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field string failing_rows_query = 10; - * @param string $var - * @return $this - */ - public function setFailingRowsQuery($var) - { - GPBUtil::checkString($var, True); - $this->failing_rows_query = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php deleted file mode 100644 index bf525a9a7dd1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php +++ /dev/null @@ -1,450 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult - */ -class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 1; - */ - protected $job_id = ''; - /** - * The data source of the data scan (e.g. BigQuery table name). - * - * Generated from protobuf field string data_source = 2; - */ - protected $data_source = ''; - /** - * The column which this rule is evaluated against. - * - * Generated from protobuf field string column = 3; - */ - protected $column = ''; - /** - * The name of the data quality rule. - * - * Generated from protobuf field string rule_name = 4; - */ - protected $rule_name = ''; - /** - * The type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; - */ - protected $rule_type = 0; - /** - * The evaluation type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; - */ - protected $evalution_type = 0; - /** - * The dimension of the data quality rule. - * - * Generated from protobuf field string rule_dimension = 7; - */ - protected $rule_dimension = ''; - /** - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * - * Generated from protobuf field double threshold_percent = 8; - */ - protected $threshold_percent = 0.0; - /** - * The result of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; - */ - protected $result = 0; - /** - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 evaluated_row_count = 10; - */ - protected $evaluated_row_count = 0; - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 passed_row_count = 11; - */ - protected $passed_row_count = 0; - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_row_count = 12; - */ - protected $null_row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $job_id - * Identifier of the specific data scan job this log entry is for. - * @type string $data_source - * The data source of the data scan (e.g. BigQuery table name). - * @type string $column - * The column which this rule is evaluated against. - * @type string $rule_name - * The name of the data quality rule. - * @type int $rule_type - * The type of the data quality rule. - * @type int $evalution_type - * The evaluation type of the data quality rule. - * @type string $rule_dimension - * The dimension of the data quality rule. - * @type float $threshold_percent - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * @type int $result - * The result of the data quality rule. - * @type int|string $evaluated_row_count - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * @type int|string $passed_row_count - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * @type int|string $null_row_count - * The number of rows with null values in the specified column. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * Identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 1; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 1; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * The data source of the data scan (e.g. BigQuery table name). - * - * Generated from protobuf field string data_source = 2; - * @return string - */ - public function getDataSource() - { - return $this->data_source; - } - - /** - * The data source of the data scan (e.g. BigQuery table name). - * - * Generated from protobuf field string data_source = 2; - * @param string $var - * @return $this - */ - public function setDataSource($var) - { - GPBUtil::checkString($var, True); - $this->data_source = $var; - - return $this; - } - - /** - * The column which this rule is evaluated against. - * - * Generated from protobuf field string column = 3; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * The column which this rule is evaluated against. - * - * Generated from protobuf field string column = 3; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * The name of the data quality rule. - * - * Generated from protobuf field string rule_name = 4; - * @return string - */ - public function getRuleName() - { - return $this->rule_name; - } - - /** - * The name of the data quality rule. - * - * Generated from protobuf field string rule_name = 4; - * @param string $var - * @return $this - */ - public function setRuleName($var) - { - GPBUtil::checkString($var, True); - $this->rule_name = $var; - - return $this; - } - - /** - * The type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; - * @return int - */ - public function getRuleType() - { - return $this->rule_type; - } - - /** - * The type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; - * @param int $var - * @return $this - */ - public function setRuleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\RuleType::class); - $this->rule_type = $var; - - return $this; - } - - /** - * The evaluation type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; - * @return int - */ - public function getEvalutionType() - { - return $this->evalution_type; - } - - /** - * The evaluation type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; - * @param int $var - * @return $this - */ - public function setEvalutionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\EvaluationType::class); - $this->evalution_type = $var; - - return $this; - } - - /** - * The dimension of the data quality rule. - * - * Generated from protobuf field string rule_dimension = 7; - * @return string - */ - public function getRuleDimension() - { - return $this->rule_dimension; - } - - /** - * The dimension of the data quality rule. - * - * Generated from protobuf field string rule_dimension = 7; - * @param string $var - * @return $this - */ - public function setRuleDimension($var) - { - GPBUtil::checkString($var, True); - $this->rule_dimension = $var; - - return $this; - } - - /** - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * - * Generated from protobuf field double threshold_percent = 8; - * @return float - */ - public function getThresholdPercent() - { - return $this->threshold_percent; - } - - /** - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * - * Generated from protobuf field double threshold_percent = 8; - * @param float $var - * @return $this - */ - public function setThresholdPercent($var) - { - GPBUtil::checkDouble($var); - $this->threshold_percent = $var; - - return $this; - } - - /** - * The result of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The result of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\Result::class); - $this->result = $var; - - return $this; - } - - /** - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 evaluated_row_count = 10; - * @return int|string - */ - public function getEvaluatedRowCount() - { - return $this->evaluated_row_count; - } - - /** - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 evaluated_row_count = 10; - * @param int|string $var - * @return $this - */ - public function setEvaluatedRowCount($var) - { - GPBUtil::checkInt64($var); - $this->evaluated_row_count = $var; - - return $this; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 passed_row_count = 11; - * @return int|string - */ - public function getPassedRowCount() - { - return $this->passed_row_count; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 passed_row_count = 11; - * @param int|string $var - * @return $this - */ - public function setPassedRowCount($var) - { - GPBUtil::checkInt64($var); - $this->passed_row_count = $var; - - return $this; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_row_count = 12; - * @return int|string - */ - public function getNullRowCount() - { - return $this->null_row_count; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_row_count = 12; - * @param int|string $var - * @return $this - */ - public function setNullRowCount($var) - { - GPBUtil::checkInt64($var); - $this->null_row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php deleted file mode 100644 index c683c18ffa95..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType - */ -class EvaluationType -{ - /** - * An unspecified evaluation type. - * - * Generated from protobuf enum EVALUATION_TYPE_UNSPECIFIED = 0; - */ - const EVALUATION_TYPE_UNSPECIFIED = 0; - /** - * The rule evaluation is done at per row level. - * - * Generated from protobuf enum PER_ROW = 1; - */ - const PER_ROW = 1; - /** - * The rule evaluation is done for an aggregate of rows. - * - * Generated from protobuf enum AGGREGATE = 2; - */ - const AGGREGATE = 2; - - private static $valueToName = [ - self::EVALUATION_TYPE_UNSPECIFIED => 'EVALUATION_TYPE_UNSPECIFIED', - self::PER_ROW => 'PER_ROW', - self::AGGREGATE => 'AGGREGATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EvaluationType::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_EvaluationType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php deleted file mode 100644 index 6fc620d48942..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult.Result - */ -class Result -{ - /** - * An unspecified result. - * - * Generated from protobuf enum RESULT_UNSPECIFIED = 0; - */ - const RESULT_UNSPECIFIED = 0; - /** - * The data quality rule passed. - * - * Generated from protobuf enum PASSED = 1; - */ - const PASSED = 1; - /** - * The data quality rule failed. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - - private static $valueToName = [ - self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', - self::PASSED => 'PASSED', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_Result::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php deleted file mode 100644 index 081cfa427aa6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType - */ -class RuleType -{ - /** - * An unspecified rule type. - * - * Generated from protobuf enum RULE_TYPE_UNSPECIFIED = 0; - */ - const RULE_TYPE_UNSPECIFIED = 0; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. - * - * Generated from protobuf enum NON_NULL_EXPECTATION = 1; - */ - const NON_NULL_EXPECTATION = 1; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. - * - * Generated from protobuf enum RANGE_EXPECTATION = 2; - */ - const RANGE_EXPECTATION = 2; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. - * - * Generated from protobuf enum REGEX_EXPECTATION = 3; - */ - const REGEX_EXPECTATION = 3; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. - * - * Generated from protobuf enum ROW_CONDITION_EXPECTATION = 4; - */ - const ROW_CONDITION_EXPECTATION = 4; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. - * - * Generated from protobuf enum SET_EXPECTATION = 5; - */ - const SET_EXPECTATION = 5; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. - * - * Generated from protobuf enum STATISTIC_RANGE_EXPECTATION = 6; - */ - const STATISTIC_RANGE_EXPECTATION = 6; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. - * - * Generated from protobuf enum TABLE_CONDITION_EXPECTATION = 7; - */ - const TABLE_CONDITION_EXPECTATION = 7; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. - * - * Generated from protobuf enum UNIQUENESS_EXPECTATION = 8; - */ - const UNIQUENESS_EXPECTATION = 8; - - private static $valueToName = [ - self::RULE_TYPE_UNSPECIFIED => 'RULE_TYPE_UNSPECIFIED', - self::NON_NULL_EXPECTATION => 'NON_NULL_EXPECTATION', - self::RANGE_EXPECTATION => 'RANGE_EXPECTATION', - self::REGEX_EXPECTATION => 'REGEX_EXPECTATION', - self::ROW_CONDITION_EXPECTATION => 'ROW_CONDITION_EXPECTATION', - self::SET_EXPECTATION => 'SET_EXPECTATION', - self::STATISTIC_RANGE_EXPECTATION => 'STATISTIC_RANGE_EXPECTATION', - self::TABLE_CONDITION_EXPECTATION => 'TABLE_CONDITION_EXPECTATION', - self::UNIQUENESS_EXPECTATION => 'UNIQUENESS_EXPECTATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RuleType::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_RuleType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php deleted file mode 100644 index 45b23f54b8df..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec - */ -class DataQualitySpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sampling_percent = 0.0; - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $row_filter = ''; - /** - * Optional. Actions to take upon job completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $post_scan_actions = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * @type float $sampling_percent - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * @type string $row_filter - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions $post_scan_actions - * Optional. Actions to take upon job completion. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRule::class); - $this->rules = $arr; - - return $this; - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRowFilter() - { - return $this->row_filter; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRowFilter($var) - { - GPBUtil::checkString($var, True); - $this->row_filter = $var; - - return $this; - } - - /** - * Optional. Actions to take upon job completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions|null - */ - public function getPostScanActions() - { - return $this->post_scan_actions; - } - - public function hasPostScanActions() - { - return isset($this->post_scan_actions); - } - - public function clearPostScanActions() - { - unset($this->post_scan_actions); - } - - /** - * Optional. Actions to take upon job completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions $var - * @return $this - */ - public function setPostScanActions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions::class); - $this->post_scan_actions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php deleted file mode 100644 index f70189d4156a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - */ -class PostScanActions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bigquery_export = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport $bigquery_export - * Optional. If set, results will be exported to the provided BigQuery - * table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport|null - */ - public function getBigqueryExport() - { - return $this->bigquery_export; - } - - public function hasBigqueryExport() - { - return isset($this->bigquery_export); - } - - public function clearBigqueryExport() - { - unset($this->bigquery_export); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport $var - * @return $this - */ - public function setBigqueryExport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport::class); - $this->bigquery_export = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActions::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php deleted file mode 100644 index 737ddd0e4ff8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - */ -class BigQueryExport extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $results_table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $results_table - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResultsTable() - { - return $this->results_table; - } - - /** - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResultsTable($var) - { - GPBUtil::checkString($var, True); - $this->results_table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExport::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_BigQueryExport::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php deleted file mode 100644 index 8f54f065081e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php +++ /dev/null @@ -1,676 +0,0 @@ -google.cloud.dataplex.v1.DataScan - */ -class DataScan extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * * Must be between 1-256 characters. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the scan. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Current state of the DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time when the scan was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the scan was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. The data source for DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = null; - /** - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $execution_spec = null; - /** - * Output only. Status of the data scan execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_status = null; - /** - * Output only. The type of DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - protected $spec; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type string $uid - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * @type string $description - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * @type string $display_name - * Optional. User friendly display name. - * * Must be between 1-256 characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the scan. - * @type int $state - * Output only. Current state of the DataScan. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the scan was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the scan was last updated. - * @type \Google\Cloud\Dataplex\V1\DataSource $data - * Required. The data source for DataScan. - * @type \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec $execution_spec - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * @type \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus $execution_status - * Output only. Status of the data scan execution. - * @type int $type - * Output only. The type of DataScan. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec $data_quality_spec - * DataQualityScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec $data_profile_spec - * DataProfileScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataQualityResult $data_quality_result - * Output only. The result of the data quality scan. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult $data_profile_result - * Output only. The result of the data profile scan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * - * 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. User friendly display name. - * * Must be between 1-256 characters. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * * Must be between 1-256 characters. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the scan. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the scan. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Current state of the DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time when the scan was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 when the scan was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 when the scan was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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 when the scan was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.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; - } - - /** - * Required. The data source for DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataSource|null - */ - public function getData() - { - return $this->data; - } - - public function hasData() - { - return isset($this->data); - } - - public function clearData() - { - unset($this->data); - } - - /** - * Required. The data source for DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataSource $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataSource::class); - $this->data = $var; - - return $this; - } - - /** - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec|null - */ - public function getExecutionSpec() - { - return $this->execution_spec; - } - - public function hasExecutionSpec() - { - return isset($this->execution_spec); - } - - public function clearExecutionSpec() - { - unset($this->execution_spec); - } - - /** - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec $var - * @return $this - */ - public function setExecutionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec::class); - $this->execution_spec = $var; - - return $this; - } - - /** - * Output only. Status of the data scan execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus|null - */ - public function getExecutionStatus() - { - return $this->execution_status; - } - - public function hasExecutionStatus() - { - return isset($this->execution_status); - } - - public function clearExecutionStatus() - { - unset($this->execution_status); - } - - /** - * Output only. Status of the data scan execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus $var - * @return $this - */ - public function setExecutionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus::class); - $this->execution_status = $var; - - return $this; - } - - /** - * Output only. The type of DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanType::class); - $this->type = $var; - - return $this; - } - - /** - * DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec|null - */ - public function getDataQualitySpec() - { - return $this->readOneof(100); - } - - public function hasDataQualitySpec() - { - return $this->hasOneof(100); - } - - /** - * DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec $var - * @return $this - */ - public function setDataQualitySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec|null - */ - public function getDataProfileSpec() - { - return $this->readOneof(101); - } - - public function hasDataProfileSpec() - { - return $this->hasOneof(101); - } - - /** - * DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec $var - * @return $this - */ - public function setDataProfileSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult|null - */ - public function getDataQualityResult() - { - return $this->readOneof(200); - } - - public function hasDataQualityResult() - { - return $this->hasOneof(200); - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult $var - * @return $this - */ - public function setDataQualityResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult|null - */ - public function getDataProfileResult() - { - return $this->readOneof(201); - } - - public function hasDataProfileResult() - { - return $this->hasOneof(201); - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult $var - * @return $this - */ - public function setDataProfileResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * @return string - */ - public function getSpec() - { - return $this->whichOneof("spec"); - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php deleted file mode 100644 index 553204435b15..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.dataplex.v1.DataScan.ExecutionSpec - */ -class ExecutionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trigger = null; - protected $incremental; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Trigger $trigger - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * @type string $field - * Immutable. The unnested field (of type *Date* or *Timestamp*) that - * contains values which monotonically increase over time. - * If not specified, a data scan will run for all data in the table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Trigger|null - */ - public function getTrigger() - { - return $this->trigger; - } - - public function hasTrigger() - { - return isset($this->trigger); - } - - public function clearTrigger() - { - unset($this->trigger); - } - - /** - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Trigger $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * Immutable. The unnested field (of type *Date* or *Timestamp*) that - * contains values which monotonically increase over time. - * If not specified, a data scan will run for all data in the table. - * - * Generated from protobuf field string field = 100 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getField() - { - return $this->readOneof(100); - } - - public function hasField() - { - return $this->hasOneof(100); - } - - /** - * Immutable. The unnested field (of type *Date* or *Timestamp*) that - * contains values which monotonically increase over time. - * If not specified, a data scan will run for all data in the table. - * - * Generated from protobuf field string field = 100 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * @return string - */ - public function getIncremental() - { - return $this->whichOneof("incremental"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionSpec::class, \Google\Cloud\Dataplex\V1\DataScan_ExecutionSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php deleted file mode 100644 index f9f827047242..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DataScan.ExecutionStatus - */ -class ExecutionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The time when the latest DataScanJob started. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; - */ - protected $latest_job_start_time = null; - /** - * The time when the latest DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; - */ - protected $latest_job_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $latest_job_start_time - * The time when the latest DataScanJob started. - * @type \Google\Protobuf\Timestamp $latest_job_end_time - * The time when the latest DataScanJob ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * The time when the latest DataScanJob started. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestJobStartTime() - { - return $this->latest_job_start_time; - } - - public function hasLatestJobStartTime() - { - return isset($this->latest_job_start_time); - } - - public function clearLatestJobStartTime() - { - unset($this->latest_job_start_time); - } - - /** - * The time when the latest DataScanJob started. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestJobStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_job_start_time = $var; - - return $this; - } - - /** - * The time when the latest DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestJobEndTime() - { - return $this->latest_job_end_time; - } - - public function hasLatestJobEndTime() - { - return isset($this->latest_job_end_time); - } - - public function clearLatestJobEndTime() - { - unset($this->latest_job_end_time); - } - - /** - * The time when the latest DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestJobEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_job_end_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionStatus::class, \Google\Cloud\Dataplex\V1\DataScan_ExecutionStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php deleted file mode 100644 index d4263d16f7ac..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php +++ /dev/null @@ -1,633 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent - */ -class DataScanEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The data source of the data scan - * - * Generated from protobuf field string data_source = 1; - */ - protected $data_source = ''; - /** - * The identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 2; - */ - protected $job_id = ''; - /** - * The time when the data scan job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; - */ - protected $create_time = null; - /** - * The time when the data scan job started to run. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * The time when the data scan job finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - */ - protected $end_time = null; - /** - * The type of the data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - */ - protected $type = 0; - /** - * The status of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - */ - protected $state = 0; - /** - * The message describing the data scan job event. - * - * Generated from protobuf field string message = 7; - */ - protected $message = ''; - /** - * A version identifier of the spec which was used to execute this job. - * - * Generated from protobuf field string spec_version = 8; - */ - protected $spec_version = ''; - /** - * The trigger type of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - */ - protected $trigger = 0; - /** - * The scope of the data scan (e.g. full, incremental). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - */ - protected $scope = 0; - /** - * The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; - */ - protected $post_scan_actions_result = null; - protected $result; - protected $appliedConfigs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data_source - * The data source of the data scan - * @type string $job_id - * The identifier of the specific data scan job this log entry is for. - * @type \Google\Protobuf\Timestamp $create_time - * The time when the data scan job was created. - * @type \Google\Protobuf\Timestamp $start_time - * The time when the data scan job started to run. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the data scan job finished. - * @type int $type - * The type of the data scan. - * @type int $state - * The status of the data scan job. - * @type string $message - * The message describing the data scan job event. - * @type string $spec_version - * A version identifier of the spec which was used to execute this job. - * @type int $trigger - * The trigger type of the data scan job. - * @type int $scope - * The scope of the data scan (e.g. full, incremental). - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult $data_profile - * Data profile result for data profile type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult $data_quality - * Data quality result for data quality type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs $data_profile_configs - * Applied configs for data profile type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs $data_quality_configs - * Applied configs for data quality type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult $post_scan_actions_result - * The result of post scan actions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The data source of the data scan - * - * Generated from protobuf field string data_source = 1; - * @return string - */ - public function getDataSource() - { - return $this->data_source; - } - - /** - * The data source of the data scan - * - * Generated from protobuf field string data_source = 1; - * @param string $var - * @return $this - */ - public function setDataSource($var) - { - GPBUtil::checkString($var, True); - $this->data_source = $var; - - return $this; - } - - /** - * The identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 2; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * The identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 2; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * The time when the data scan job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; - * @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); - } - - /** - * The time when the data scan job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time when the data scan job started to run. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time when the data scan job started to run. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time when the data scan job finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time when the data scan job finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The type of the data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\ScanType::class); - $this->type = $var; - - return $this; - } - - /** - * The status of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The status of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\State::class); - $this->state = $var; - - return $this; - } - - /** - * The message describing the data scan job event. - * - * Generated from protobuf field string message = 7; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The message describing the data scan job event. - * - * Generated from protobuf field string message = 7; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * A version identifier of the spec which was used to execute this job. - * - * Generated from protobuf field string spec_version = 8; - * @return string - */ - public function getSpecVersion() - { - return $this->spec_version; - } - - /** - * A version identifier of the spec which was used to execute this job. - * - * Generated from protobuf field string spec_version = 8; - * @param string $var - * @return $this - */ - public function setSpecVersion($var) - { - GPBUtil::checkString($var, True); - $this->spec_version = $var; - - return $this; - } - - /** - * The trigger type of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * @return int - */ - public function getTrigger() - { - return $this->trigger; - } - - /** - * The trigger type of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * @param int $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * The scope of the data scan (e.g. full, incremental). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * The scope of the data scan (e.g. full, incremental). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Data profile result for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult|null - */ - public function getDataProfile() - { - return $this->readOneof(101); - } - - public function hasDataProfile() - { - return $this->hasOneof(101); - } - - /** - * Data profile result for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult $var - * @return $this - */ - public function setDataProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Data quality result for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult|null - */ - public function getDataQuality() - { - return $this->readOneof(102); - } - - public function hasDataQuality() - { - return $this->hasOneof(102); - } - - /** - * Data quality result for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult $var - * @return $this - */ - public function setDataQuality($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Applied configs for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs|null - */ - public function getDataProfileConfigs() - { - return $this->readOneof(201); - } - - public function hasDataProfileConfigs() - { - return $this->hasOneof(201); - } - - /** - * Applied configs for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs $var - * @return $this - */ - public function setDataProfileConfigs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * Applied configs for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs|null - */ - public function getDataQualityConfigs() - { - return $this->readOneof(202); - } - - public function hasDataQualityConfigs() - { - return $this->hasOneof(202); - } - - /** - * Applied configs for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs $var - * @return $this - */ - public function setDataQualityConfigs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs::class); - $this->writeOneof(202, $var); - - return $this; - } - - /** - * The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult|null - */ - public function getPostScanActionsResult() - { - return $this->post_scan_actions_result; - } - - public function hasPostScanActionsResult() - { - return isset($this->post_scan_actions_result); - } - - public function clearPostScanActionsResult() - { - unset($this->post_scan_actions_result); - } - - /** - * The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult $var - * @return $this - */ - public function setPostScanActionsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult::class); - $this->post_scan_actions_result = $var; - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - - /** - * @return string - */ - public function getAppliedConfigs() - { - return $this->whichOneof("appliedConfigs"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php deleted file mode 100644 index 61dcc852f43c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - */ -class DataProfileAppliedConfigs extends \Google\Protobuf\Internal\Message -{ - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - */ - protected $sampling_percent = 0.0; - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - */ - protected $row_filter_applied = false; - /** - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * - * Generated from protobuf field bool column_filter_applied = 3; - */ - protected $column_filter_applied = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_percent - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * @type bool $row_filter_applied - * Boolean indicating whether a row filter was applied in the DataScan job. - * @type bool $column_filter_applied - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @return bool - */ - public function getRowFilterApplied() - { - return $this->row_filter_applied; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @param bool $var - * @return $this - */ - public function setRowFilterApplied($var) - { - GPBUtil::checkBool($var); - $this->row_filter_applied = $var; - - return $this; - } - - /** - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * - * Generated from protobuf field bool column_filter_applied = 3; - * @return bool - */ - public function getColumnFilterApplied() - { - return $this->column_filter_applied; - } - - /** - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * - * Generated from protobuf field bool column_filter_applied = 3; - * @param bool $var - * @return $this - */ - public function setColumnFilterApplied($var) - { - GPBUtil::checkBool($var); - $this->column_filter_applied = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataProfileAppliedConfigs::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataProfileAppliedConfigs::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php deleted file mode 100644 index 90adffac7a98..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - */ -class DataProfileResult extends \Google\Protobuf\Internal\Message -{ - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - */ - protected $row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $row_count - * The count of rows processed in the data scan job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataProfileResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataProfileResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php deleted file mode 100644 index 345a434d0e4b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - */ -class DataQualityAppliedConfigs extends \Google\Protobuf\Internal\Message -{ - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - */ - protected $sampling_percent = 0.0; - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - */ - protected $row_filter_applied = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_percent - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * @type bool $row_filter_applied - * Boolean indicating whether a row filter was applied in the DataScan job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @return bool - */ - public function getRowFilterApplied() - { - return $this->row_filter_applied; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @param bool $var - * @return $this - */ - public function setRowFilterApplied($var) - { - GPBUtil::checkBool($var); - $this->row_filter_applied = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataQualityAppliedConfigs::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataQualityAppliedConfigs::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php deleted file mode 100644 index 171f7d9baf54..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - */ -class DataQualityResult extends \Google\Protobuf\Internal\Message -{ - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - */ - protected $row_count = 0; - /** - * Whether the data quality result was `pass` or not. - * - * Generated from protobuf field bool passed = 2; - */ - protected $passed = false; - /** - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * - * Generated from protobuf field map dimension_passed = 3; - */ - private $dimension_passed; - /** - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - /** - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map dimension_score = 5; - */ - private $dimension_score; - /** - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map column_score = 6; - */ - private $column_score; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $row_count - * The count of rows processed in the data scan job. - * @type bool $passed - * Whether the data quality result was `pass` or not. - * @type array|\Google\Protobuf\Internal\MapField $dimension_passed - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * @type float $score - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * @type array|\Google\Protobuf\Internal\MapField $dimension_score - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * @type array|\Google\Protobuf\Internal\MapField $column_score - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * Whether the data quality result was `pass` or not. - * - * Generated from protobuf field bool passed = 2; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Whether the data quality result was `pass` or not. - * - * Generated from protobuf field bool passed = 2; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - - /** - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * - * Generated from protobuf field map dimension_passed = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDimensionPassed() - { - return $this->dimension_passed; - } - - /** - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * - * Generated from protobuf field map dimension_passed = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDimensionPassed($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::BOOL); - $this->dimension_passed = $arr; - - return $this; - } - - /** - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map dimension_score = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDimensionScore() - { - return $this->dimension_score; - } - - /** - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map dimension_score = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDimensionScore($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->dimension_score = $arr; - - return $this; - } - - /** - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map column_score = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getColumnScore() - { - return $this->column_score; - } - - /** - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map column_score = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setColumnScore($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->column_score = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataQualityResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataQualityResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php deleted file mode 100644 index d842233b4a2b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - */ -class PostScanActionsResult extends \Google\Protobuf\Internal\Message -{ - /** - * The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; - */ - protected $bigquery_export_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult $bigquery_export_result - * The result of BigQuery export post scan action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult|null - */ - public function getBigqueryExportResult() - { - return $this->bigquery_export_result; - } - - public function hasBigqueryExportResult() - { - return isset($this->bigquery_export_result); - } - - public function clearBigqueryExportResult() - { - unset($this->bigquery_export_result); - } - - /** - * The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult $var - * @return $this - */ - public function setBigqueryExportResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult::class); - $this->bigquery_export_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php deleted file mode 100644 index 9cda8309c5b6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - */ -class BigQueryExportResult extends \Google\Protobuf\Internal\Message -{ - /** - * Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Execution state for the BigQuery exporting. - * @type string $message - * Additional information about the BigQuery exporting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult_BigQueryExportResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php deleted file mode 100644 index 31bc945ef3fb..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State - */ -class State -{ - /** - * The exporting state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The exporting completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * The exporting is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The exporting is skipped due to no valid scan result to export - * (usually caused by scan failed). - * - * Generated from protobuf enum SKIPPED = 3; - */ - const SKIPPED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::SKIPPED => 'SKIPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult_BigQueryExportResult_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php deleted file mode 100644 index 5c9e261acb29..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.ScanType - */ -class ScanType -{ - /** - * An unspecified data scan type. - * - * Generated from protobuf enum SCAN_TYPE_UNSPECIFIED = 0; - */ - const SCAN_TYPE_UNSPECIFIED = 0; - /** - * Data scan for data profile. - * - * Generated from protobuf enum DATA_PROFILE = 1; - */ - const DATA_PROFILE = 1; - /** - * Data scan for data quality. - * - * Generated from protobuf enum DATA_QUALITY = 2; - */ - const DATA_QUALITY = 2; - - private static $valueToName = [ - self::SCAN_TYPE_UNSPECIFIED => 'SCAN_TYPE_UNSPECIFIED', - self::DATA_PROFILE => 'DATA_PROFILE', - self::DATA_QUALITY => 'DATA_QUALITY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ScanType::class, \Google\Cloud\Dataplex\V1\DataScanEvent_ScanType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php deleted file mode 100644 index b81bd29422c8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.Scope - */ -class Scope -{ - /** - * An unspecified scope type. - * - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * Data scan runs on all of the data. - * - * Generated from protobuf enum FULL = 1; - */ - const FULL = 1; - /** - * Data scan runs on incremental data. - * - * Generated from protobuf enum INCREMENTAL = 2; - */ - const INCREMENTAL = 2; - - private static $valueToName = [ - self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', - self::FULL => 'FULL', - self::INCREMENTAL => 'INCREMENTAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scope::class, \Google\Cloud\Dataplex\V1\DataScanEvent_Scope::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php deleted file mode 100644 index 29f93fc47dd1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.State - */ -class State -{ - /** - * Unspecified job state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Data scan job started. - * - * Generated from protobuf enum STARTED = 1; - */ - const STARTED = 1; - /** - * Data scan job successfully completed. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Data scan job was unsuccessful. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Data scan job was cancelled. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - /** - * Data scan job was createed. - * - * Generated from protobuf enum CREATED = 5; - */ - const CREATED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTED => 'STARTED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - self::CREATED => 'CREATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanEvent_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php deleted file mode 100644 index 5eb2d66898ba..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.Trigger - */ -class Trigger -{ - /** - * An unspecified trigger type. - * - * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; - */ - const TRIGGER_UNSPECIFIED = 0; - /** - * Data scan triggers on demand. - * - * Generated from protobuf enum ON_DEMAND = 1; - */ - const ON_DEMAND = 1; - /** - * Data scan triggers as per schedule. - * - * Generated from protobuf enum SCHEDULE = 2; - */ - const SCHEDULE = 2; - - private static $valueToName = [ - self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', - self::ON_DEMAND => 'ON_DEMAND', - self::SCHEDULE => 'SCHEDULE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Trigger::class, \Google\Cloud\Dataplex\V1\DataScanEvent_Trigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php deleted file mode 100644 index c9d59028ed9e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php +++ /dev/null @@ -1,453 +0,0 @@ -google.cloud.dataplex.v1.DataScanJob - */ -class DataScanJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the DataScanJob. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataScanJob was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The time when the DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Execution state for the DataScanJob. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - /** - * Output only. The type of the parent DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - protected $spec; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type string $uid - * Output only. System generated globally unique ID for the DataScanJob. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time when the DataScanJob was started. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time when the DataScanJob ended. - * @type int $state - * Output only. Execution state for the DataScanJob. - * @type string $message - * Output only. Additional information about the current state. - * @type int $type - * Output only. The type of the parent DataScan. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec $data_quality_spec - * Output only. DataQualityScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec $data_profile_spec - * Output only. DataProfileScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataQualityResult $data_quality_result - * Output only. The result of the data quality scan. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult $data_profile_result - * Output only. The result of the data profile scan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the DataScanJob. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the DataScanJob. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataScanJob was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The time when the DataScanJob was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The time when the DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time when the DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Execution state for the DataScanJob. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the DataScanJob. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 6 [(.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 type of the parent DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of the parent DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec|null - */ - public function getDataQualitySpec() - { - return $this->readOneof(100); - } - - public function hasDataQualitySpec() - { - return $this->hasOneof(100); - } - - /** - * Output only. DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec $var - * @return $this - */ - public function setDataQualitySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Output only. DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec|null - */ - public function getDataProfileSpec() - { - return $this->readOneof(101); - } - - public function hasDataProfileSpec() - { - return $this->hasOneof(101); - } - - /** - * Output only. DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec $var - * @return $this - */ - public function setDataProfileSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult|null - */ - public function getDataQualityResult() - { - return $this->readOneof(200); - } - - public function hasDataQualityResult() - { - return $this->hasOneof(200); - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult $var - * @return $this - */ - public function setDataQualityResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult|null - */ - public function getDataProfileResult() - { - return $this->readOneof(201); - } - - public function hasDataProfileResult() - { - return $this->hasOneof(201); - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult $var - * @return $this - */ - public function setDataProfileResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * @return string - */ - public function getSpec() - { - return $this->whichOneof("spec"); - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php deleted file mode 100644 index 2f9f1f2be1a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dataplex.v1.DataScanJob.State - */ -class State -{ - /** - * The DataScanJob state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The DataScanJob is running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The DataScanJob is canceling. - * - * Generated from protobuf enum CANCELING = 2; - */ - const CANCELING = 2; - /** - * The DataScanJob cancellation was successful. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The DataScanJob completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The DataScanJob is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The DataScanJob has been created but not started to run yet. - * - * Generated from protobuf enum PENDING = 7; - */ - const PENDING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::CANCELING => 'CANCELING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::PENDING => 'PENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanJob_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php deleted file mode 100644 index 66a3a372f908..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.dataplex.v1.DataScanType - */ -class DataScanType -{ - /** - * The DataScan type is unspecified. - * - * Generated from protobuf enum DATA_SCAN_TYPE_UNSPECIFIED = 0; - */ - const DATA_SCAN_TYPE_UNSPECIFIED = 0; - /** - * Data Quality scan. - * - * Generated from protobuf enum DATA_QUALITY = 1; - */ - const DATA_QUALITY = 1; - /** - * Data Profile scan. - * - * Generated from protobuf enum DATA_PROFILE = 2; - */ - const DATA_PROFILE = 2; - - private static $valueToName = [ - self::DATA_SCAN_TYPE_UNSPECIFIED => 'DATA_SCAN_TYPE_UNSPECIFIED', - self::DATA_QUALITY => 'DATA_QUALITY', - self::DATA_PROFILE => 'DATA_PROFILE', - ]; - - 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php deleted file mode 100644 index 4ed62915b28d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.dataplex.v1.DataSource - */ -class DataSource extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity - * Immutable. The Dataplex entity that represents the data source (e.g. - * BigQuery table) for DataScan, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type string $resource - * Immutable. The service-qualified full resource name of the cloud resource - * for a DataScan job to scan against. The field could be: BigQuery table of - * type "TABLE" for DataProfileScan/DataQualityScan Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The Dataplex entity that represents the data source (e.g. - * BigQuery table) for DataScan, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string entity = 100 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getEntity() - { - return $this->readOneof(100); - } - - public function hasEntity() - { - return $this->hasOneof(100); - } - - /** - * Immutable. The Dataplex entity that represents the data source (e.g. - * BigQuery table) for DataScan, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string entity = 100 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Immutable. The service-qualified full resource name of the cloud resource - * for a DataScan job to scan against. The field could be: BigQuery table of - * type "TABLE" for DataProfileScan/DataQualityScan Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string resource = 101 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResource() - { - return $this->readOneof(101); - } - - public function hasResource() - { - return $this->hasOneof(101); - } - - /** - * Immutable. The service-qualified full resource name of the cloud resource - * for a DataScan job to scan against. The field could be: BigQuery table of - * type "TABLE" for DataProfileScan/DataQualityScan Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string resource = 101 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php deleted file mode 100644 index 5fb5f3a7c589..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php +++ /dev/null @@ -1,415 +0,0 @@ -google.cloud.dataplex.v1.DataTaxonomy - */ -class DataTaxonomy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataTaxonomy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the DataTaxonomy was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the DataTaxonomy. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the DataTaxonomy. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. The number of attributes in the DataTaxonomy. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attribute_count = 0; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - */ - protected $etag = ''; - /** - * Output only. The number of classes in the DataTaxonomy. - * - * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $class_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * @type string $uid - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the DataTaxonomy was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the DataTaxonomy was last updated. - * @type string $description - * Optional. Description of the DataTaxonomy. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the DataTaxonomy. - * @type int $attribute_count - * Output only. The number of attributes in the DataTaxonomy. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type int $class_count - * Output only. The number of classes in the DataTaxonomy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataTaxonomy was created. - * - * 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. The time when the DataTaxonomy was created. - * - * 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. The time when the DataTaxonomy was last updated. - * - * 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. The time when the DataTaxonomy was last updated. - * - * 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. Description of the DataTaxonomy. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the DataTaxonomy. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the DataTaxonomy. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the DataTaxonomy. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The number of attributes in the DataTaxonomy. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAttributeCount() - { - return $this->attribute_count; - } - - /** - * Output only. The number of attributes in the DataTaxonomy. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAttributeCount($var) - { - GPBUtil::checkInt32($var); - $this->attribute_count = $var; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. The number of classes in the DataTaxonomy. - * - * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getClassCount() - { - return $this->class_count; - } - - /** - * Output only. The number of classes in the DataTaxonomy. - * - * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setClassCount($var) - { - GPBUtil::checkInt32($var); - $this->class_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php deleted file mode 100644 index 52cbcfe8c9d8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteAssetRequest - */ -class DeleteAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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 asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see - * {@see DataplexServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteAssetRequest - * - * @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 asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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 asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php deleted file mode 100644 index 132887e9d3a5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteContentRequest - */ -class DeleteContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * 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 content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * Please see {@see ContentServiceClient::contentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteContentRequest - * - * @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 content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * 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 content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php deleted file mode 100644 index 4efe4d2724c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - */ -class DeleteDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeBindingName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataAttributeBindingRequest - * - * @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 DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * @type string $etag - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * 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 DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php deleted file mode 100644 index 819df2652cfd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataAttributeRequest - */ -class DeleteDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataAttributeRequest - * - * @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 DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * 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 DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * 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 the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php deleted file mode 100644 index 613ef402d4ea..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataScanRequest - */ -class DeleteDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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 dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataScanRequest - * - * @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 dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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 dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php deleted file mode 100644 index a06802b72d28..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - */ -class DeleteDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataTaxonomyRequest - * - * @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 DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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 DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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 the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php deleted file mode 100644 index 60803562a44c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteEntityRequest - */ -class DeleteEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see - * {@see MetadataServiceClient::entityName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteEntityRequest - * - * @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 entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type string $etag - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * 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 entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php deleted file mode 100644 index 39a9ffc44d4a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteEnvironmentRequest - */ -class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * 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 environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see - * {@see DataplexServiceClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteEnvironmentRequest - * - * @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 environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * 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 environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php deleted file mode 100644 index 7290cc2f7e49..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteLakeRequest - */ -class DeleteLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteLakeRequest - * - * @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 lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php deleted file mode 100644 index 4b9c452fa696..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.dataplex.v1.DeletePartitionRequest - */ -class DeletePartitionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The etag associated with the partition. - * - * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. Please see - * {@see MetadataServiceClient::partitionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeletePartitionRequest - * - * @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 partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @type string $etag - * Optional. The etag associated with the partition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * 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 partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * 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 etag associated with the partition. - * - * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getEtag() - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - return $this->etag; - } - - /** - * Optional. The etag associated with the partition. - * - * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEtag($var) - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php deleted file mode 100644 index 29666656ccad..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteTaskRequest - */ -class DeleteTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * - * 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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteTaskRequest - * - * @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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * - * 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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php deleted file mode 100644 index d22235aebd9b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteZoneRequest - */ -class DeleteZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteZoneRequest - * - * @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 zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php deleted file mode 100644 index c72a91aa4b02..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php +++ /dev/null @@ -1,378 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent - */ -class DiscoveryEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The id of the associated lake. - * - * Generated from protobuf field string lake_id = 2; - */ - protected $lake_id = ''; - /** - * The id of the associated zone. - * - * Generated from protobuf field string zone_id = 3; - */ - protected $zone_id = ''; - /** - * The id of the associated asset. - * - * Generated from protobuf field string asset_id = 4; - */ - protected $asset_id = ''; - /** - * The data location associated with the event. - * - * Generated from protobuf field string data_location = 5; - */ - protected $data_location = ''; - /** - * The type of the event being logged. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; - */ - protected $type = 0; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type string $lake_id - * The id of the associated lake. - * @type string $zone_id - * The id of the associated zone. - * @type string $asset_id - * The id of the associated asset. - * @type string $data_location - * The data location associated with the event. - * @type int $type - * The type of the event being logged. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $config - * Details about discovery configuration in effect. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $entity - * Details about the entity associated with the event. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $partition - * Details about the partition associated with the event. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $action - * Details about the action associated with the event. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The id of the associated lake. - * - * Generated from protobuf field string lake_id = 2; - * @return string - */ - public function getLakeId() - { - return $this->lake_id; - } - - /** - * The id of the associated lake. - * - * Generated from protobuf field string lake_id = 2; - * @param string $var - * @return $this - */ - public function setLakeId($var) - { - GPBUtil::checkString($var, True); - $this->lake_id = $var; - - return $this; - } - - /** - * The id of the associated zone. - * - * Generated from protobuf field string zone_id = 3; - * @return string - */ - public function getZoneId() - { - return $this->zone_id; - } - - /** - * The id of the associated zone. - * - * Generated from protobuf field string zone_id = 3; - * @param string $var - * @return $this - */ - public function setZoneId($var) - { - GPBUtil::checkString($var, True); - $this->zone_id = $var; - - return $this; - } - - /** - * The id of the associated asset. - * - * Generated from protobuf field string asset_id = 4; - * @return string - */ - public function getAssetId() - { - return $this->asset_id; - } - - /** - * The id of the associated asset. - * - * Generated from protobuf field string asset_id = 4; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - - /** - * The data location associated with the event. - * - * Generated from protobuf field string data_location = 5; - * @return string - */ - public function getDataLocation() - { - return $this->data_location; - } - - /** - * The data location associated with the event. - * - * Generated from protobuf field string data_location = 5; - * @param string $var - * @return $this - */ - public function setDataLocation($var) - { - GPBUtil::checkString($var, True); - $this->data_location = $var; - - return $this; - } - - /** - * The type of the event being logged. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the event being logged. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * Details about discovery configuration in effect. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails|null - */ - public function getConfig() - { - return $this->readOneof(20); - } - - public function hasConfig() - { - return $this->hasOneof(20); - } - - /** - * Details about discovery configuration in effect. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Details about the entity associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails|null - */ - public function getEntity() - { - return $this->readOneof(21); - } - - public function hasEntity() - { - return $this->hasOneof(21); - } - - /** - * Details about the entity associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Details about the partition associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails|null - */ - public function getPartition() - { - return $this->readOneof(22); - } - - public function hasPartition() - { - return $this->hasOneof(22); - } - - /** - * Details about the partition associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Details about the action associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails|null - */ - public function getAction() - { - return $this->readOneof(23); - } - - public function hasAction() - { - return $this->hasOneof(23); - } - - /** - * Details about the action associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php deleted file mode 100644 index a0159af03d0f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - */ -class ActionDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ActionDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_ActionDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php deleted file mode 100644 index 50371340de3b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - */ -class ConfigDetails extends \Google\Protobuf\Internal\Message -{ - /** - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * - * Generated from protobuf field map parameters = 1; - */ - private $parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $parameters - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * - * Generated from protobuf field map parameters = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * - * Generated from protobuf field map parameters = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->parameters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConfigDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_ConfigDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php deleted file mode 100644 index 9ed95e8a58e9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - */ -class EntityDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 1; - */ - protected $entity = ''; - /** - * The type of the entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity - * The name of the entity resource. - * The name is the fully-qualified resource name. - * @type int $type - * The type of the entity resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The name of the entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 1; - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * The name of the entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 1; - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->entity = $var; - - return $this; - } - - /** - * The type of the entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityType::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EntityDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php deleted file mode 100644 index 6bb43ff6c38d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.EntityType - */ -class EntityType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum ENTITY_TYPE_UNSPECIFIED = 0; - */ - const ENTITY_TYPE_UNSPECIFIED = 0; - /** - * Entities representing structured data. - * - * Generated from protobuf enum TABLE = 1; - */ - const TABLE = 1; - /** - * Entities representing unstructured data. - * - * Generated from protobuf enum FILESET = 2; - */ - const FILESET = 2; - - private static $valueToName = [ - self::ENTITY_TYPE_UNSPECIFIED => 'ENTITY_TYPE_UNSPECIFIED', - self::TABLE => 'TABLE', - self::FILESET => 'FILESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityType::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EntityType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php deleted file mode 100644 index 6bcc8a2096e4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.EventType - */ -class EventType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * An event representing discovery configuration in effect. - * - * Generated from protobuf enum CONFIG = 1; - */ - const CONFIG = 1; - /** - * An event representing a metadata entity being created. - * - * Generated from protobuf enum ENTITY_CREATED = 2; - */ - const ENTITY_CREATED = 2; - /** - * An event representing a metadata entity being updated. - * - * Generated from protobuf enum ENTITY_UPDATED = 3; - */ - const ENTITY_UPDATED = 3; - /** - * An event representing a metadata entity being deleted. - * - * Generated from protobuf enum ENTITY_DELETED = 4; - */ - const ENTITY_DELETED = 4; - /** - * An event representing a partition being created. - * - * Generated from protobuf enum PARTITION_CREATED = 5; - */ - const PARTITION_CREATED = 5; - /** - * An event representing a partition being updated. - * - * Generated from protobuf enum PARTITION_UPDATED = 6; - */ - const PARTITION_UPDATED = 6; - /** - * An event representing a partition being deleted. - * - * Generated from protobuf enum PARTITION_DELETED = 7; - */ - const PARTITION_DELETED = 7; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::CONFIG => 'CONFIG', - self::ENTITY_CREATED => 'ENTITY_CREATED', - self::ENTITY_UPDATED => 'ENTITY_UPDATED', - self::ENTITY_DELETED => 'ENTITY_DELETED', - self::PARTITION_CREATED => 'PARTITION_CREATED', - self::PARTITION_UPDATED => 'PARTITION_UPDATED', - self::PARTITION_DELETED => 'PARTITION_DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EventType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php deleted file mode 100644 index 111e8dab6343..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - */ -class PartitionDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The name to the partition resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string partition = 1; - */ - protected $partition = ''; - /** - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 2; - */ - protected $entity = ''; - /** - * The type of the containing entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; - */ - protected $type = 0; - /** - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - */ - private $sampled_data_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $partition - * The name to the partition resource. - * The name is the fully-qualified resource name. - * @type string $entity - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * @type int $type - * The type of the containing entity resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The name to the partition resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string partition = 1; - * @return string - */ - public function getPartition() - { - return $this->partition; - } - - /** - * The name to the partition resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string partition = 1; - * @param string $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkString($var, True); - $this->partition = $var; - - return $this; - } - - /** - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 2; - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 2; - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->entity = $var; - - return $this; - } - - /** - * The type of the containing entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the containing entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityType::class); - $this->type = $var; - - return $this; - } - - /** - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampledDataLocations() - { - return $this->sampled_data_locations; - } - - /** - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampledDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sampled_data_locations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_PartitionDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php deleted file mode 100644 index 452871e6f7eb..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php +++ /dev/null @@ -1,785 +0,0 @@ -google.cloud.dataplex.v1.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Display name must be shorter than or equal to 256 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The time when the entity 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 when the entity was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Required. Immutable. The type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * - * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $asset = ''; - /** - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * - * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $data_path = ''; - /** - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * - * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_path_pattern = ''; - /** - * Output only. The name of the associated Data Catalog entry. - * - * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $catalog_entry = ''; - /** - * Required. Immutable. Identifies the storage system of the entity data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $system = 0; - /** - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $format = null; - /** - * Output only. Metadata stores that the entity is compatible with. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compatibility = null; - /** - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $access = null; - /** - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * @type string $display_name - * Optional. Display name must be shorter than or equal to 256 characters. - * @type string $description - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the entity was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the entity was last updated. - * @type string $id - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * @type string $etag - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * @type int $type - * Required. Immutable. The type of entity. - * @type string $asset - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * @type string $data_path - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * @type string $data_path_pattern - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * @type string $catalog_entry - * Output only. The name of the associated Data Catalog entry. - * @type int $system - * Required. Immutable. Identifies the storage system of the entity data. - * @type \Google\Cloud\Dataplex\V1\StorageFormat $format - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus $compatibility - * Output only. Metadata stores that the entity is compatible with. - * @type \Google\Cloud\Dataplex\V1\StorageAccess $access - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * @type string $uid - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * @type \Google\Cloud\Dataplex\V1\Schema $schema - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Display name must be shorter than or equal to 256 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Display name must be shorter than or equal to 256 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The time when the entity 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 when the entity 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 when the entity 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 when the entity 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; - } - - /** - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Required. Immutable. The type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. The type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * - * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * - * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * - * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDataPath() - { - return $this->data_path; - } - - /** - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * - * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDataPath($var) - { - GPBUtil::checkString($var, True); - $this->data_path = $var; - - return $this; - } - - /** - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * - * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDataPathPattern() - { - return $this->data_path_pattern; - } - - /** - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * - * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDataPathPattern($var) - { - GPBUtil::checkString($var, True); - $this->data_path_pattern = $var; - - return $this; - } - - /** - * Output only. The name of the associated Data Catalog entry. - * - * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCatalogEntry() - { - return $this->catalog_entry; - } - - /** - * Output only. The name of the associated Data Catalog entry. - * - * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCatalogEntry($var) - { - GPBUtil::checkString($var, True); - $this->catalog_entry = $var; - - return $this; - } - - /** - * Required. Immutable. Identifies the storage system of the entity data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getSystem() - { - return $this->system; - } - - /** - * Required. Immutable. Identifies the storage system of the entity data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setSystem($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageSystem::class); - $this->system = $var; - - return $this; - } - - /** - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat|null - */ - public function getFormat() - { - return $this->format; - } - - public function hasFormat() - { - return isset($this->format); - } - - public function clearFormat() - { - unset($this->format); - } - - /** - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat::class); - $this->format = $var; - - return $this; - } - - /** - * Output only. Metadata stores that the entity is compatible with. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus|null - */ - public function getCompatibility() - { - return $this->compatibility; - } - - public function hasCompatibility() - { - return isset($this->compatibility); - } - - public function clearCompatibility() - { - unset($this->compatibility); - } - - /** - * Output only. Metadata stores that the entity is compatible with. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus $var - * @return $this - */ - public function setCompatibility($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus::class); - $this->compatibility = $var; - - return $this; - } - - /** - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\StorageAccess|null - */ - public function getAccess() - { - return $this->access; - } - - public function hasAccess() - { - return isset($this->access); - } - - public function clearAccess() - { - unset($this->access); - } - - /** - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\StorageAccess $var - * @return $this - */ - public function setAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageAccess::class); - $this->access = $var; - - return $this; - } - - /** - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Schema|null - */ - public function getSchema() - { - return $this->schema; - } - - public function hasSchema() - { - return isset($this->schema); - } - - public function clearSchema() - { - unset($this->schema); - } - - /** - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Schema $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Schema::class); - $this->schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php deleted file mode 100644 index c329e3c6cc85..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.Entity.CompatibilityStatus - */ -class CompatibilityStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether this entity is compatible with Hive Metastore. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hive_metastore = null; - /** - * Output only. Whether this entity is compatible with BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bigquery = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $hive_metastore - * Output only. Whether this entity is compatible with Hive Metastore. - * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $bigquery - * Output only. Whether this entity is compatible with BigQuery. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Whether this entity is compatible with Hive Metastore. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility|null - */ - public function getHiveMetastore() - { - return $this->hive_metastore; - } - - public function hasHiveMetastore() - { - return isset($this->hive_metastore); - } - - public function clearHiveMetastore() - { - unset($this->hive_metastore); - } - - /** - * Output only. Whether this entity is compatible with Hive Metastore. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $var - * @return $this - */ - public function setHiveMetastore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility::class); - $this->hive_metastore = $var; - - return $this; - } - - /** - * Output only. Whether this entity is compatible with BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility|null - */ - public function getBigquery() - { - return $this->bigquery; - } - - public function hasBigquery() - { - return isset($this->bigquery); - } - - public function clearBigquery() - { - unset($this->bigquery); - } - - /** - * Output only. Whether this entity is compatible with BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $var - * @return $this - */ - public function setBigquery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility::class); - $this->bigquery = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompatibilityStatus::class, \Google\Cloud\Dataplex\V1\Entity_CompatibilityStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php deleted file mode 100644 index 31fef738a26b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - */ -class Compatibility extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * - * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compatible = false; - /** - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $compatible - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * @type string $reason - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * - * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getCompatible() - { - return $this->compatible; - } - - /** - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * - * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setCompatible($var) - { - GPBUtil::checkBool($var); - $this->compatible = $var; - - return $this; - } - - /** - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Compatibility::class, \Google\Cloud\Dataplex\V1\Entity_CompatibilityStatus_Compatibility::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php deleted file mode 100644 index 15f0ab139313..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Entity.Type - */ -class Type -{ - /** - * Type unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Structured and semi-structured data. - * - * Generated from protobuf enum TABLE = 1; - */ - const TABLE = 1; - /** - * Unstructured data. - * - * Generated from protobuf enum FILESET = 2; - */ - const FILESET = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::TABLE => 'TABLE', - self::FILESET => 'FILESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Entity_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php deleted file mode 100644 index 3236d2eab3a1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php +++ /dev/null @@ -1,518 +0,0 @@ -google.cloud.dataplex.v1.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. Environment creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the environment was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the environment. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the environment. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Infrastructure specification for the Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $infrastructure_spec = null; - /** - * Optional. Configuration for sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $session_spec = null; - /** - * Output only. Status of sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $session_status = null; - /** - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoints = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Environment creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the environment was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the environment. - * @type string $description - * Optional. Description of the environment. - * @type int $state - * Output only. Current state of the environment. - * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec $infrastructure_spec - * Required. Infrastructure specification for the Environment. - * @type \Google\Cloud\Dataplex\V1\Environment\SessionSpec $session_spec - * Optional. Configuration for sessions created for this environment. - * @type \Google\Cloud\Dataplex\V1\Environment\SessionStatus $session_status - * Output only. Status of sessions created for this environment. - * @type \Google\Cloud\Dataplex\V1\Environment\Endpoints $endpoints - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. Environment creation 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. Environment creation 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. The time when the environment 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 when the environment 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; - } - - /** - * Optional. User defined labels for the environment. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the environment. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the environment. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the environment. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Infrastructure specification for the Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec|null - */ - public function getInfrastructureSpec() - { - return $this->infrastructure_spec; - } - - public function hasInfrastructureSpec() - { - return isset($this->infrastructure_spec); - } - - public function clearInfrastructureSpec() - { - unset($this->infrastructure_spec); - } - - /** - * Required. Infrastructure specification for the Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec $var - * @return $this - */ - public function setInfrastructureSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec::class); - $this->infrastructure_spec = $var; - - return $this; - } - - /** - * Optional. Configuration for sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Environment\SessionSpec|null - */ - public function getSessionSpec() - { - return $this->session_spec; - } - - public function hasSessionSpec() - { - return isset($this->session_spec); - } - - public function clearSessionSpec() - { - unset($this->session_spec); - } - - /** - * Optional. Configuration for sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Environment\SessionSpec $var - * @return $this - */ - public function setSessionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\SessionSpec::class); - $this->session_spec = $var; - - return $this; - } - - /** - * Output only. Status of sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Environment\SessionStatus|null - */ - public function getSessionStatus() - { - return $this->session_status; - } - - public function hasSessionStatus() - { - return isset($this->session_status); - } - - public function clearSessionStatus() - { - unset($this->session_status); - } - - /** - * Output only. Status of sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Environment\SessionStatus $var - * @return $this - */ - public function setSessionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\SessionStatus::class); - $this->session_status = $var; - - return $this; - } - - /** - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Environment\Endpoints|null - */ - public function getEndpoints() - { - return $this->endpoints; - } - - public function hasEndpoints() - { - return isset($this->endpoints); - } - - public function clearEndpoints() - { - unset($this->endpoints); - } - - /** - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Environment\Endpoints $var - * @return $this - */ - public function setEndpoints($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\Endpoints::class); - $this->endpoints = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php deleted file mode 100644 index 018f2692a575..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.Environment.Endpoints - */ -class Endpoints extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. URI to serve notebook APIs - * - * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $notebooks = ''; - /** - * Output only. URI to serve SQL APIs - * - * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sql = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebooks - * Output only. URI to serve notebook APIs - * @type string $sql - * Output only. URI to serve SQL APIs - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. URI to serve notebook APIs - * - * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNotebooks() - { - return $this->notebooks; - } - - /** - * Output only. URI to serve notebook APIs - * - * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNotebooks($var) - { - GPBUtil::checkString($var, True); - $this->notebooks = $var; - - return $this; - } - - /** - * Output only. URI to serve SQL APIs - * - * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSql() - { - return $this->sql; - } - - /** - * Output only. URI to serve SQL APIs - * - * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSql($var) - { - GPBUtil::checkString($var, True); - $this->sql = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Endpoints::class, \Google\Cloud\Dataplex\V1\Environment_Endpoints::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php deleted file mode 100644 index b5402934b75d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.dataplex.v1.Environment.InfrastructureSpec - */ -class InfrastructureSpec extends \Google\Protobuf\Internal\Message -{ - protected $resources; - protected $runtime; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources $compute - * Optional. Compute resources needed for analyze interactive workloads. - * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime $os_image - * Required. Software Runtime Configuration for analyze interactive - * workloads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Compute resources needed for analyze interactive workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources compute = 50 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources|null - */ - public function getCompute() - { - return $this->readOneof(50); - } - - public function hasCompute() - { - return $this->hasOneof(50); - } - - /** - * Optional. Compute resources needed for analyze interactive workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources compute = 50 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources $var - * @return $this - */ - public function setCompute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources::class); - $this->writeOneof(50, $var); - - return $this; - } - - /** - * Required. Software Runtime Configuration for analyze interactive - * workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime os_image = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime|null - */ - public function getOsImage() - { - return $this->readOneof(100); - } - - public function hasOsImage() - { - return $this->hasOneof(100); - } - - /** - * Required. Software Runtime Configuration for analyze interactive - * workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime os_image = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime $var - * @return $this - */ - public function setOsImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * @return string - */ - public function getResources() - { - return $this->whichOneof("resources"); - } - - /** - * @return string - */ - public function getRuntime() - { - return $this->whichOneof("runtime"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InfrastructureSpec::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php deleted file mode 100644 index 08481337d023..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - */ -class ComputeResources extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Size in GB of the disk. Default is 100 GB. - * - * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_size_gb = 0; - /** - * Optional. Total number of nodes in the sessions created for this - * environment. - * - * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_count = 0; - /** - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * - * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_node_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $disk_size_gb - * Optional. Size in GB of the disk. Default is 100 GB. - * @type int $node_count - * Optional. Total number of nodes in the sessions created for this - * environment. - * @type int $max_node_count - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Size in GB of the disk. Default is 100 GB. - * - * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Optional. Size in GB of the disk. Default is 100 GB. - * - * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Optional. Total number of nodes in the sessions created for this - * environment. - * - * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Optional. Total number of nodes in the sessions created for this - * environment. - * - * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * - * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * - * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComputeResources::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec_ComputeResources::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php deleted file mode 100644 index 774611919e01..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - */ -class OsImageRuntime extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Dataplex Image version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $image_version = ''; - /** - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $java_libraries; - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $python_packages; - /** - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_version - * Required. Dataplex Image version. - * @type array|\Google\Protobuf\Internal\RepeatedField $java_libraries - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * @type array|\Google\Protobuf\Internal\RepeatedField $python_packages - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Required. Dataplex Image version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImageVersion() - { - return $this->image_version; - } - - /** - * Required. Dataplex Image version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImageVersion($var) - { - GPBUtil::checkString($var, True); - $this->image_version = $var; - - return $this; - } - - /** - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJavaLibraries() - { - return $this->java_libraries; - } - - /** - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJavaLibraries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->java_libraries = $arr; - - return $this; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPythonPackages() - { - return $this->python_packages; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPythonPackages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->python_packages = $arr; - - return $this; - } - - /** - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OsImageRuntime::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec_OsImageRuntime::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php deleted file mode 100644 index 875f0566626c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.dataplex.v1.Environment.SessionSpec - */ -class SessionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * - * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_idle_duration = null; - /** - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * - * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_fast_startup = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $max_idle_duration - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * @type bool $enable_fast_startup - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * - * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxIdleDuration() - { - return $this->max_idle_duration; - } - - public function hasMaxIdleDuration() - { - return isset($this->max_idle_duration); - } - - public function clearMaxIdleDuration() - { - unset($this->max_idle_duration); - } - - /** - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * - * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxIdleDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_idle_duration = $var; - - return $this; - } - - /** - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * - * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableFastStartup() - { - return $this->enable_fast_startup; - } - - /** - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * - * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableFastStartup($var) - { - GPBUtil::checkBool($var); - $this->enable_fast_startup = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SessionSpec::class, \Google\Cloud\Dataplex\V1\Environment_SessionSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php deleted file mode 100644 index 9a9d1e9ac250..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.Environment.SessionStatus - */ -class SessionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * - * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $active = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $active - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * - * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * - * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setActive($var) - { - GPBUtil::checkBool($var); - $this->active = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SessionStatus::class, \Google\Cloud\Dataplex\V1\Environment_SessionStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php deleted file mode 100644 index a130f8dfdf58..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetAssetRequest - */ -class GetAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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 asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see - * {@see DataplexServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetAssetRequest - * - * @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 asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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 asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php deleted file mode 100644 index f22038fef6a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dataplex.v1.GetContentRequest - */ -class GetContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Specify content view to make a partial request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * Please see {@see ContentServiceClient::contentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetContentRequest - * - * @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 content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @type int $view - * Optional. Specify content view to make a partial request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * 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 content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * 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. Specify content view to make a partial request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Specify content view to make a partial request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetContentRequest\ContentView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php deleted file mode 100644 index 4ac623081ebd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dataplex.v1.GetContentRequest.ContentView - */ -class ContentView -{ - /** - * Content view not specified. Defaults to BASIC. - * The API will default to the BASIC view. - * - * Generated from protobuf enum CONTENT_VIEW_UNSPECIFIED = 0; - */ - const CONTENT_VIEW_UNSPECIFIED = 0; - /** - * Will not return the `data_text` field. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Returns the complete proto. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::CONTENT_VIEW_UNSPECIFIED => 'CONTENT_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContentView::class, \Google\Cloud\Dataplex\V1\GetContentRequest_ContentView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php deleted file mode 100644 index 9da780a77c99..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetDataAttributeBindingRequest - */ -class GetDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * 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 DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeBindingName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataAttributeBindingRequest - * - * @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 DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * 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 DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php deleted file mode 100644 index 9d7f615635de..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetDataAttributeRequest - */ -class GetDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * 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 dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataAttributeRequest - * - * @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 dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * 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 dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php deleted file mode 100644 index 6ae5f004f3c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanJobRequest - */ -class GetDataScanJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanJobName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataScanJobRequest - * - * @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 DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $view - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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 DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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. Select the DataScanJob view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetDataScanJobRequest\DataScanJobView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php deleted file mode 100644 index 456b7b16e7a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView - */ -class DataScanJobView -{ - /** - * The API will default to the `BASIC` view. - * - * Generated from protobuf enum DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; - */ - const DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; - /** - * Basic view that does not include *spec* and *result*. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 10; - */ - const FULL = 10; - - private static $valueToName = [ - self::DATA_SCAN_JOB_VIEW_UNSPECIFIED => 'DATA_SCAN_JOB_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataScanJobView::class, \Google\Cloud\Dataplex\V1\GetDataScanJobRequest_DataScanJobView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php deleted file mode 100644 index c3c75f71a955..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanRequest - */ -class GetDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataScanRequest - * - * @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 dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $view - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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 dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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. Select the DataScan view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetDataScanRequest\DataScanView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php deleted file mode 100644 index 2f5e406bef81..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanRequest.DataScanView - */ -class DataScanView -{ - /** - * The API will default to the `BASIC` view. - * - * Generated from protobuf enum DATA_SCAN_VIEW_UNSPECIFIED = 0; - */ - const DATA_SCAN_VIEW_UNSPECIFIED = 0; - /** - * Basic view that does not include *spec* and *result*. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 10; - */ - const FULL = 10; - - private static $valueToName = [ - self::DATA_SCAN_VIEW_UNSPECIFIED => 'DATA_SCAN_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataScanView::class, \Google\Cloud\Dataplex\V1\GetDataScanRequest_DataScanView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php deleted file mode 100644 index 08d9be6edded..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetDataTaxonomyRequest - */ -class GetDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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 DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataTaxonomyRequest - * - * @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 DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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 DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php deleted file mode 100644 index ea9917eb51b9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.GetEntityRequest - */ -class GetEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * Please see {@see MetadataServiceClient::entityName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetEntityRequest - * - * @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 entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * @type int $view - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * - * 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 entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * - * 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. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetEntityRequest\EntityView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php deleted file mode 100644 index ad4952b5751c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.GetEntityRequest.EntityView - */ -class EntityView -{ - /** - * The API will default to the `BASIC` view. - * - * Generated from protobuf enum ENTITY_VIEW_UNSPECIFIED = 0; - */ - const ENTITY_VIEW_UNSPECIFIED = 0; - /** - * Minimal view that does not include the schema. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include basic information and schema. - * - * Generated from protobuf enum SCHEMA = 2; - */ - const SCHEMA = 2; - /** - * Include everything. Currently, this is the same as the SCHEMA view. - * - * Generated from protobuf enum FULL = 4; - */ - const FULL = 4; - - private static $valueToName = [ - self::ENTITY_VIEW_UNSPECIFIED => 'ENTITY_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::SCHEMA => 'SCHEMA', - self::FULL => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityView::class, \Google\Cloud\Dataplex\V1\GetEntityRequest_EntityView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php deleted file mode 100644 index ac5c5f444540..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetEnvironmentRequest - */ -class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * 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 environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see - * {@see DataplexServiceClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetEnvironmentRequest - * - * @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 environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * 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 environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php deleted file mode 100644 index bd2193f0bdc7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * 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 job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. Please see - * {@see DataplexServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetJobRequest - * - * @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 job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * 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 job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php deleted file mode 100644 index 0258ba185430..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetLakeRequest - */ -class GetLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetLakeRequest - * - * @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 lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php deleted file mode 100644 index 43b96cbd181b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.dataplex.v1.GetPartitionRequest - */ -class GetPartitionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * 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 partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. Please see - * {@see MetadataServiceClient::partitionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetPartitionRequest - * - * @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 partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * 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 partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php deleted file mode 100644 index 47d121f37e2d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * - * 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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetTaskRequest - * - * @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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * - * 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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php deleted file mode 100644 index 916e309dabbe..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetZoneRequest - */ -class GetZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetZoneRequest - * - * @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 zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php deleted file mode 100644 index 62efaeb04fad..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent - */ -class GovernanceEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; - */ - protected $event_type = 0; - /** - * Entity resource information if the log event is associated with a - * specific entity. - * - * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; - */ - protected $entity = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type int $event_type - * The type of the event. - * @type \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity $entity - * Entity resource information if the log event is associated with a - * specific entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; - * @return int - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; - * @param int $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\EventType::class); - $this->event_type = $var; - - return $this; - } - - /** - * Entity resource information if the log event is associated with a - * specific entity. - * - * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; - * @return \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Entity resource information if the log event is associated with a - * specific entity. - * - * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; - * @param \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity::class); - $this->entity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php deleted file mode 100644 index 267d96437943..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * - * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { - */ - protected $entity = ''; - /** - * Type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; - */ - protected $entity_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * @type int $entity_type - * Type of entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * - * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * - * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->entity = $var; - - return $this; - } - - /** - * Type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; - * @return int - */ - public function getEntityType() - { - return $this->entity_type; - } - - /** - * Type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; - * @param int $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity\EntityType::class); - $this->entity_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entity::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_Entity::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php deleted file mode 100644 index a41babd15894..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType - */ -class EntityType -{ - /** - * An unspecified Entity type. - * - * Generated from protobuf enum ENTITY_TYPE_UNSPECIFIED = 0; - */ - const ENTITY_TYPE_UNSPECIFIED = 0; - /** - * Table entity type. - * - * Generated from protobuf enum TABLE = 1; - */ - const TABLE = 1; - /** - * Fileset entity type. - * - * Generated from protobuf enum FILESET = 2; - */ - const FILESET = 2; - - private static $valueToName = [ - self::ENTITY_TYPE_UNSPECIFIED => 'ENTITY_TYPE_UNSPECIFIED', - self::TABLE => 'TABLE', - self::FILESET => 'FILESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityType::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_Entity_EntityType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php deleted file mode 100644 index f12657954ff2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent.EventType - */ -class EventType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * Resource IAM policy update event. - * - * Generated from protobuf enum RESOURCE_IAM_POLICY_UPDATE = 1; - */ - const RESOURCE_IAM_POLICY_UPDATE = 1; - /** - * BigQuery table create event. - * - * Generated from protobuf enum BIGQUERY_TABLE_CREATE = 2; - */ - const BIGQUERY_TABLE_CREATE = 2; - /** - * BigQuery table update event. - * - * Generated from protobuf enum BIGQUERY_TABLE_UPDATE = 3; - */ - const BIGQUERY_TABLE_UPDATE = 3; - /** - * BigQuery table delete event. - * - * Generated from protobuf enum BIGQUERY_TABLE_DELETE = 4; - */ - const BIGQUERY_TABLE_DELETE = 4; - /** - * BigQuery connection create event. - * - * Generated from protobuf enum BIGQUERY_CONNECTION_CREATE = 5; - */ - const BIGQUERY_CONNECTION_CREATE = 5; - /** - * BigQuery connection update event. - * - * Generated from protobuf enum BIGQUERY_CONNECTION_UPDATE = 6; - */ - const BIGQUERY_CONNECTION_UPDATE = 6; - /** - * BigQuery connection delete event. - * - * Generated from protobuf enum BIGQUERY_CONNECTION_DELETE = 7; - */ - const BIGQUERY_CONNECTION_DELETE = 7; - /** - * BigQuery taxonomy created. - * - * Generated from protobuf enum BIGQUERY_TAXONOMY_CREATE = 10; - */ - const BIGQUERY_TAXONOMY_CREATE = 10; - /** - * BigQuery policy tag created. - * - * Generated from protobuf enum BIGQUERY_POLICY_TAG_CREATE = 11; - */ - const BIGQUERY_POLICY_TAG_CREATE = 11; - /** - * BigQuery policy tag deleted. - * - * Generated from protobuf enum BIGQUERY_POLICY_TAG_DELETE = 12; - */ - const BIGQUERY_POLICY_TAG_DELETE = 12; - /** - * BigQuery set iam policy for policy tag. - * - * Generated from protobuf enum BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; - */ - const BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; - /** - * Access policy update event. - * - * Generated from protobuf enum ACCESS_POLICY_UPDATE = 14; - */ - const ACCESS_POLICY_UPDATE = 14; - /** - * Number of resources matched with particular Query. - * - * Generated from protobuf enum GOVERNANCE_RULE_MATCHED_RESOURCES = 15; - */ - const GOVERNANCE_RULE_MATCHED_RESOURCES = 15; - /** - * Rule processing exceeds the allowed limit. - * - * Generated from protobuf enum GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; - */ - const GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; - /** - * Rule processing errors. - * - * Generated from protobuf enum GOVERNANCE_RULE_ERRORS = 17; - */ - const GOVERNANCE_RULE_ERRORS = 17; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::RESOURCE_IAM_POLICY_UPDATE => 'RESOURCE_IAM_POLICY_UPDATE', - self::BIGQUERY_TABLE_CREATE => 'BIGQUERY_TABLE_CREATE', - self::BIGQUERY_TABLE_UPDATE => 'BIGQUERY_TABLE_UPDATE', - self::BIGQUERY_TABLE_DELETE => 'BIGQUERY_TABLE_DELETE', - self::BIGQUERY_CONNECTION_CREATE => 'BIGQUERY_CONNECTION_CREATE', - self::BIGQUERY_CONNECTION_UPDATE => 'BIGQUERY_CONNECTION_UPDATE', - self::BIGQUERY_CONNECTION_DELETE => 'BIGQUERY_CONNECTION_DELETE', - self::BIGQUERY_TAXONOMY_CREATE => 'BIGQUERY_TAXONOMY_CREATE', - self::BIGQUERY_POLICY_TAG_CREATE => 'BIGQUERY_POLICY_TAG_CREATE', - self::BIGQUERY_POLICY_TAG_DELETE => 'BIGQUERY_POLICY_TAG_DELETE', - self::BIGQUERY_POLICY_TAG_SET_IAM_POLICY => 'BIGQUERY_POLICY_TAG_SET_IAM_POLICY', - self::ACCESS_POLICY_UPDATE => 'ACCESS_POLICY_UPDATE', - self::GOVERNANCE_RULE_MATCHED_RESOURCES => 'GOVERNANCE_RULE_MATCHED_RESOURCES', - self::GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS => 'GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS', - self::GOVERNANCE_RULE_ERRORS => 'GOVERNANCE_RULE_ERRORS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_EventType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php deleted file mode 100644 index d01c70cc3595..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php +++ /dev/null @@ -1,483 +0,0 @@ -google.cloud.dataplex.v1.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the job was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The time when the job ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Execution state for the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * - * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $retry_count = 0; - /** - * Output only. The underlying service running a job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service = 0; - /** - * Output only. The full resource name for the job run under a particular - * service. - * - * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_job = ''; - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - /** - * Output only. User-defined labels for the task. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - /** - * Output only. Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $trigger = 0; - /** - * Output only. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * @type string $uid - * Output only. System generated globally unique ID for the job. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time when the job was started. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time when the job ended. - * @type int $state - * Output only. Execution state for the job. - * @type int $retry_count - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * @type int $service - * Output only. The underlying service running a job. - * @type string $service_job - * Output only. The full resource name for the job run under a particular - * service. - * @type string $message - * Output only. Additional information about the current state. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Output only. User-defined labels for the task. - * @type int $trigger - * Output only. Job execution trigger. - * @type \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $execution_spec - * Output only. Spec related to how a task is executed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the job was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The time when the job was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The time when the job ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time when the job ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Execution state for the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * - * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRetryCount() - { - return $this->retry_count; - } - - /** - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * - * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRetryCount($var) - { - GPBUtil::checkUint32($var); - $this->retry_count = $var; - - return $this; - } - - /** - * Output only. The underlying service running a job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getService() - { - return $this->service; - } - - /** - * Output only. The underlying service running a job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\Service::class); - $this->service = $var; - - return $this; - } - - /** - * Output only. The full resource name for the job run under a particular - * service. - * - * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceJob() - { - return $this->service_job; - } - - /** - * Output only. The full resource name for the job run under a particular - * service. - * - * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceJob($var) - { - GPBUtil::checkString($var, True); - $this->service_job = $var; - - return $this; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 9 [(.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. User-defined labels for the task. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. User-defined labels for the task. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTrigger() - { - return $this->trigger; - } - - /** - * Output only. Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * Output only. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Task\ExecutionSpec|null - */ - public function getExecutionSpec() - { - return $this->execution_spec; - } - - public function hasExecutionSpec() - { - return isset($this->execution_spec); - } - - public function clearExecutionSpec() - { - unset($this->execution_spec); - } - - /** - * Output only. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $var - * @return $this - */ - public function setExecutionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionSpec::class); - $this->execution_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php deleted file mode 100644 index 08e0a6e08b68..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php +++ /dev/null @@ -1,55 +0,0 @@ -google.cloud.dataplex.v1.Job.Service - */ -class Service -{ - /** - * Service used to run the job is unspecified. - * - * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; - */ - const SERVICE_UNSPECIFIED = 0; - /** - * Dataproc service is used to run this job. - * - * Generated from protobuf enum DATAPROC = 1; - */ - const DATAPROC = 1; - - private static $valueToName = [ - self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', - self::DATAPROC => 'DATAPROC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Service::class, \Google\Cloud\Dataplex\V1\Job_Service::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php deleted file mode 100644 index 52ab56038e03..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.dataplex.v1.Job.State - */ -class State -{ - /** - * The job state is unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The job is running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The job is cancelling. - * - * Generated from protobuf enum CANCELLING = 2; - */ - const CANCELLING = 2; - /** - * The job cancellation was successful. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The job completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The job is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The job was cancelled outside of Dataplex. - * - * Generated from protobuf enum ABORTED = 6; - */ - const ABORTED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::ABORTED => 'ABORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Job_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php deleted file mode 100644 index 9a1d83d03c54..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.Job.Trigger - */ -class Trigger -{ - /** - * The trigger is unspecified. - * - * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; - */ - const TRIGGER_UNSPECIFIED = 0; - /** - * The job was triggered by Dataplex based on trigger spec from task - * definition. - * - * Generated from protobuf enum TASK_CONFIG = 1; - */ - const TASK_CONFIG = 1; - /** - * The job was triggered by the explicit call of Task API. - * - * Generated from protobuf enum RUN_REQUEST = 2; - */ - const RUN_REQUEST = 2; - - private static $valueToName = [ - self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', - self::TASK_CONFIG => 'TASK_CONFIG', - self::RUN_REQUEST => 'RUN_REQUEST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Trigger::class, \Google\Cloud\Dataplex\V1\Job_Trigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php deleted file mode 100644 index 63a1762204e0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php +++ /dev/null @@ -1,394 +0,0 @@ -google.cloud.dataplex.v1.JobEvent - */ -class JobEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The unique id identifying the job. - * - * Generated from protobuf field string job_id = 2; - */ - protected $job_id = ''; - /** - * The time when the job started running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * The time when the job ended running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - */ - protected $end_time = null; - /** - * The job state on completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; - */ - protected $state = 0; - /** - * The number of retries. - * - * Generated from protobuf field int32 retries = 6; - */ - protected $retries = 0; - /** - * The type of the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; - */ - protected $type = 0; - /** - * The service used to execute the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; - */ - protected $service = 0; - /** - * The reference to the job within the service. - * - * Generated from protobuf field string service_job = 9; - */ - protected $service_job = ''; - /** - * Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; - */ - protected $execution_trigger = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type string $job_id - * The unique id identifying the job. - * @type \Google\Protobuf\Timestamp $start_time - * The time when the job started running. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the job ended running. - * @type int $state - * The job state on completion. - * @type int $retries - * The number of retries. - * @type int $type - * The type of the job. - * @type int $service - * The service used to execute the job. - * @type string $service_job - * The reference to the job within the service. - * @type int $execution_trigger - * Job execution trigger. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The unique id identifying the job. - * - * Generated from protobuf field string job_id = 2; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * The unique id identifying the job. - * - * Generated from protobuf field string job_id = 2; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * The time when the job started running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time when the job started running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time when the job ended running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time when the job ended running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The job state on completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The job state on completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\State::class); - $this->state = $var; - - return $this; - } - - /** - * The number of retries. - * - * Generated from protobuf field int32 retries = 6; - * @return int - */ - public function getRetries() - { - return $this->retries; - } - - /** - * The number of retries. - * - * Generated from protobuf field int32 retries = 6; - * @param int $var - * @return $this - */ - public function setRetries($var) - { - GPBUtil::checkInt32($var); - $this->retries = $var; - - return $this; - } - - /** - * The type of the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The service used to execute the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; - * @return int - */ - public function getService() - { - return $this->service; - } - - /** - * The service used to execute the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; - * @param int $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\Service::class); - $this->service = $var; - - return $this; - } - - /** - * The reference to the job within the service. - * - * Generated from protobuf field string service_job = 9; - * @return string - */ - public function getServiceJob() - { - return $this->service_job; - } - - /** - * The reference to the job within the service. - * - * Generated from protobuf field string service_job = 9; - * @param string $var - * @return $this - */ - public function setServiceJob($var) - { - GPBUtil::checkString($var, True); - $this->service_job = $var; - - return $this; - } - - /** - * Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; - * @return int - */ - public function getExecutionTrigger() - { - return $this->execution_trigger; - } - - /** - * Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; - * @param int $var - * @return $this - */ - public function setExecutionTrigger($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\ExecutionTrigger::class); - $this->execution_trigger = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php deleted file mode 100644 index 57c73028f4ff..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.ExecutionTrigger - */ -class ExecutionTrigger -{ - /** - * The job execution trigger is unspecified. - * - * Generated from protobuf enum EXECUTION_TRIGGER_UNSPECIFIED = 0; - */ - const EXECUTION_TRIGGER_UNSPECIFIED = 0; - /** - * The job was triggered by Dataplex based on trigger spec from task - * definition. - * - * Generated from protobuf enum TASK_CONFIG = 1; - */ - const TASK_CONFIG = 1; - /** - * The job was triggered by the explicit call of Task API. - * - * Generated from protobuf enum RUN_REQUEST = 2; - */ - const RUN_REQUEST = 2; - - private static $valueToName = [ - self::EXECUTION_TRIGGER_UNSPECIFIED => 'EXECUTION_TRIGGER_UNSPECIFIED', - self::TASK_CONFIG => 'TASK_CONFIG', - self::RUN_REQUEST => 'RUN_REQUEST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionTrigger::class, \Google\Cloud\Dataplex\V1\JobEvent_ExecutionTrigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php deleted file mode 100644 index 14aa09b7b03b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.Service - */ -class Service -{ - /** - * Unspecified service. - * - * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; - */ - const SERVICE_UNSPECIFIED = 0; - /** - * Cloud Dataproc. - * - * Generated from protobuf enum DATAPROC = 1; - */ - const DATAPROC = 1; - - private static $valueToName = [ - self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', - self::DATAPROC => 'DATAPROC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Service::class, \Google\Cloud\Dataplex\V1\JobEvent_Service::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php deleted file mode 100644 index 11e855f84d74..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.State - */ -class State -{ - /** - * Unspecified job state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Job successfully completed. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * Job was unsuccessful. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * Job was cancelled by the user. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * Job was cancelled or aborted via the service executing the job. - * - * Generated from protobuf enum ABORTED = 4; - */ - const ABORTED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - self::ABORTED => 'ABORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\JobEvent_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php deleted file mode 100644 index b30325d652ae..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.Type - */ -class Type -{ - /** - * Unspecified job type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Spark jobs. - * - * Generated from protobuf enum SPARK = 1; - */ - const SPARK = 1; - /** - * Notebook jobs. - * - * Generated from protobuf enum NOTEBOOK = 2; - */ - const NOTEBOOK = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::SPARK => 'SPARK', - self::NOTEBOOK => 'NOTEBOOK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\JobEvent_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php deleted file mode 100644 index 29862ba39797..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php +++ /dev/null @@ -1,518 +0,0 @@ -google.cloud.dataplex.v1.Lake - */ -class Lake extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the lake 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 when the lake was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User-defined labels for the lake. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the lake. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account = ''; - /** - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metastore = null; - /** - * Output only. Aggregated status of the underlying assets of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_status = null; - /** - * Output only. Metastore status of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metastore_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the lake was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the lake was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the lake. - * @type string $description - * Optional. Description of the lake. - * @type int $state - * Output only. Current state of the lake. - * @type string $service_account - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * @type \Google\Cloud\Dataplex\V1\Lake\Metastore $metastore - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * @type \Google\Cloud\Dataplex\V1\AssetStatus $asset_status - * Output only. Aggregated status of the underlying assets of the lake. - * @type \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus $metastore_status - * Output only. Metastore status of the lake. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the lake 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 when the lake 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 when the lake 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 when the lake 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; - } - - /** - * Optional. User-defined labels for the lake. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the lake. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the lake. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the lake. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Lake\Metastore|null - */ - public function getMetastore() - { - return $this->metastore; - } - - public function hasMetastore() - { - return isset($this->metastore); - } - - public function clearMetastore() - { - unset($this->metastore); - } - - /** - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Lake\Metastore $var - * @return $this - */ - public function setMetastore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake\Metastore::class); - $this->metastore = $var; - - return $this; - } - - /** - * Output only. Aggregated status of the underlying assets of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\AssetStatus|null - */ - public function getAssetStatus() - { - return $this->asset_status; - } - - public function hasAssetStatus() - { - return isset($this->asset_status); - } - - public function clearAssetStatus() - { - unset($this->asset_status); - } - - /** - * Output only. Aggregated status of the underlying assets of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\AssetStatus $var - * @return $this - */ - public function setAssetStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AssetStatus::class); - $this->asset_status = $var; - - return $this; - } - - /** - * Output only. Metastore status of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus|null - */ - public function getMetastoreStatus() - { - return $this->metastore_status; - } - - public function hasMetastoreStatus() - { - return isset($this->metastore_status); - } - - public function clearMetastoreStatus() - { - unset($this->metastore_status); - } - - /** - * Output only. Metastore status of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus $var - * @return $this - */ - public function setMetastoreStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus::class); - $this->metastore_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php deleted file mode 100644 index 3af3e06ed129..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dataplex.v1.Lake.Metastore - */ -class Metastore extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metastore::class, \Google\Cloud\Dataplex\V1\Lake_Metastore::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php deleted file mode 100644 index 26a7a00c8ad9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.dataplex.v1.Lake.MetastoreStatus - */ -class MetastoreStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Current state of association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current status. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the metastore status of the lake. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * The URI of the endpoint used to access the Metastore service. - * - * Generated from protobuf field string endpoint = 4; - */ - protected $endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Current state of association. - * @type string $message - * Additional information about the current status. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the metastore status of the lake. - * @type string $endpoint - * The URI of the endpoint used to access the Metastore service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Current state of association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Current state of association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current status. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current status. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the metastore status of the lake. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @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); - } - - /** - * Last update time of the metastore status of the lake. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The URI of the endpoint used to access the Metastore service. - * - * Generated from protobuf field string endpoint = 4; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * The URI of the endpoint used to access the Metastore service. - * - * Generated from protobuf field string endpoint = 4; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetastoreStatus::class, \Google\Cloud\Dataplex\V1\Lake_MetastoreStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php deleted file mode 100644 index c80f36501c7e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.Lake.MetastoreStatus.State - */ -class State -{ - /** - * Unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A Metastore service instance is not associated with the lake. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * A Metastore service instance is attached to the lake. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Attach/detach is in progress. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Attach/detach could not be done due to errors. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::NONE => 'NONE', - self::READY => 'READY', - self::UPDATING => 'UPDATING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Lake_MetastoreStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php deleted file mode 100644 index fe396fe3f398..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListActionsResponse - */ -class ListActionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Actions under the given parent lake/zone/asset. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; - */ - private $actions; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Action>|\Google\Protobuf\Internal\RepeatedField $actions - * Actions under the given parent lake/zone/asset. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Actions under the given parent lake/zone/asset. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActions() - { - return $this->actions; - } - - /** - * Actions under the given parent lake/zone/asset. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; - * @param array<\Google\Cloud\Dataplex\V1\Action>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Action::class); - $this->actions = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php deleted file mode 100644 index ac5d5fa802be..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListAssetActionsRequest - */ -class ListAssetActionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` 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 = ''; - - /** - * @param string $parent Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see - * {@see DataplexServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListAssetActionsRequest - * - * @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 name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @type int $page_size - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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 name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * 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. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` 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. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` 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; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php deleted file mode 100644 index 7509ce399872..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.dataplex.v1.ListAssetsRequest - */ -class ListAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets 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. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListAssetsRequest - * - * @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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type int $page_size - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets 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. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets 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. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` 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. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php deleted file mode 100644 index 44d12c30ab42..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListAssetsResponse - */ -class ListAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Asset under the given parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; - */ - private $assets; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets - * Asset under the given parent zone. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Asset under the given parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssets() - { - return $this->assets; - } - - /** - * Asset under the given parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; - * @param array<\Google\Cloud\Dataplex\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Asset::class); - $this->assets = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php deleted file mode 100644 index df25d8b1b3b8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php +++ /dev/null @@ -1,232 +0,0 @@ -google.cloud.dataplex.v1.ListContentRequest - */ -class ListContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content 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. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` 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. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * Please see {@see ContentServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListContentRequest - * - * @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 name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @type int $page_size - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * 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 name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * 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. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content 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. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content 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. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` 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. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` 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. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php deleted file mode 100644 index b66d35eec61d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListContentResponse - */ -class ListContentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Content under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; - */ - private $content; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Content>|\Google\Protobuf\Internal\RepeatedField $content - * Content under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Content under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContent() - { - return $this->content; - } - - /** - * Content under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; - * @param array<\Google\Cloud\Dataplex\V1\Content>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContent($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Content::class); - $this->content = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php deleted file mode 100644 index 8e0d0c433968..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - */ -class ListDataAttributeBindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings 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. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` 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. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * Please see {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataAttributeBindingsRequest - * - * @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 name of the Location: - * projects/{project_number}/locations/{location_id} - * @type int $page_size - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * @type string $filter - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * - * 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 name of the Location: - * projects/{project_number}/locations/{location_id} - * - * 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. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings 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. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings 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. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` 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. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` 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. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php deleted file mode 100644 index f4d75e557b7c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - */ -class ListDataAttributeBindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataAttributeBindings under the given parent Location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; - */ - private $data_attribute_bindings; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataAttributeBinding>|\Google\Protobuf\Internal\RepeatedField $data_attribute_bindings - * DataAttributeBindings under the given parent Location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * DataAttributeBindings under the given parent Location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataAttributeBindings() - { - return $this->data_attribute_bindings; - } - - /** - * DataAttributeBindings under the given parent Location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataAttributeBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataAttributeBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); - $this->data_attribute_bindings = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php deleted file mode 100644 index 94503d7719b2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributesRequest - */ -class ListDataAttributesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * 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. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataAttributesRequest - * - * @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 name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @type int $page_size - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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 name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * 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. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * 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. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * 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. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` 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. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php deleted file mode 100644 index 393dea1f5b47..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributesResponse - */ -class ListDataAttributesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataAttributes under the given parent DataTaxonomy. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; - */ - private $data_attributes; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataAttribute>|\Google\Protobuf\Internal\RepeatedField $data_attributes - * DataAttributes under the given parent DataTaxonomy. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * DataAttributes under the given parent DataTaxonomy. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataAttributes() - { - return $this->data_attributes; - } - - /** - * DataAttributes under the given parent DataTaxonomy. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttribute::class); - $this->data_attributes = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php deleted file mode 100644 index aec91a29af33..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php +++ /dev/null @@ -1,266 +0,0 @@ -google.cloud.dataplex.v1.ListDataScanJobsRequest - */ -class ListDataScanJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs 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. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` 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. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataScanJobsRequest - * - * @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 name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * @type string $filter - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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 name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs 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. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs 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. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` 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. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` 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. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php deleted file mode 100644 index 0768d4f37321..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListDataScanJobsResponse - */ -class ListDataScanJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataScanJobs (`BASIC` view only) under a given dataScan. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; - */ - private $data_scan_jobs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataScanJob>|\Google\Protobuf\Internal\RepeatedField $data_scan_jobs - * DataScanJobs (`BASIC` view only) under a given dataScan. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * DataScanJobs (`BASIC` view only) under a given dataScan. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataScanJobs() - { - return $this->data_scan_jobs; - } - - /** - * DataScanJobs (`BASIC` view only) under a given dataScan. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataScanJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataScanJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataScanJob::class); - $this->data_scan_jobs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php deleted file mode 100644 index f17be758d891..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.dataplex.v1.ListDataScansRequest - */ -class ListDataScansRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans 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. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataScansRequest - * - * @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 name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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 name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * 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. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans 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. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans 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. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` 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. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php deleted file mode 100644 index 5dd91ea1531c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataScansResponse - */ -class ListDataScansResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataScans (`BASIC` view only) under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; - */ - private $data_scans; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataScan>|\Google\Protobuf\Internal\RepeatedField $data_scans - * DataScans (`BASIC` view only) under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * DataScans (`BASIC` view only) under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataScans() - { - return $this->data_scans; - } - - /** - * DataScans (`BASIC` view only) under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataScan>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataScans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataScan::class); - $this->data_scans = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php deleted file mode 100644 index 655454555997..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.dataplex.v1.ListDataTaxonomiesRequest - */ -class ListDataTaxonomiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * 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. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataTaxonomiesRequest - * - * @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 name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * 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 name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * 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. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * 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. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * 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. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` 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. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php deleted file mode 100644 index afec40a23ba1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataTaxonomiesResponse - */ -class ListDataTaxonomiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataTaxonomies under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; - */ - private $data_taxonomies; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataTaxonomy>|\Google\Protobuf\Internal\RepeatedField $data_taxonomies - * DataTaxonomies under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * DataTaxonomies under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataTaxonomies() - { - return $this->data_taxonomies; - } - - /** - * DataTaxonomies under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataTaxonomy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataTaxonomies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); - $this->data_taxonomies = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php deleted file mode 100644 index 307bb3a83e46..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php +++ /dev/null @@ -1,270 +0,0 @@ -google.cloud.dataplex.v1.ListEntitiesRequest - */ -class ListEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Specify the entity view to make a partial list request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = 0; - /** - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see MetadataServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListEntitiesRequest - * - * @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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type int $view - * Required. Specify the entity view to make a partial list request. - * @type int $page_size - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * @type string $page_token - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * @type string $filter - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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. Specify the entity view to make a partial list request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Required. Specify the entity view to make a partial list request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\ListEntitiesRequest\EntityView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 4 [(.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. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php deleted file mode 100644 index 4a09aa0866d5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.ListEntitiesRequest.EntityView - */ -class EntityView -{ - /** - * The default unset value. Return both table and fileset entities - * if unspecified. - * - * Generated from protobuf enum ENTITY_VIEW_UNSPECIFIED = 0; - */ - const ENTITY_VIEW_UNSPECIFIED = 0; - /** - * Only list table entities. - * - * Generated from protobuf enum TABLES = 1; - */ - const TABLES = 1; - /** - * Only list fileset entities. - * - * Generated from protobuf enum FILESETS = 2; - */ - const FILESETS = 2; - - private static $valueToName = [ - self::ENTITY_VIEW_UNSPECIFIED => 'ENTITY_VIEW_UNSPECIFIED', - self::TABLES => 'TABLES', - self::FILESETS => 'FILESETS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityView::class, \Google\Cloud\Dataplex\V1\ListEntitiesRequest_EntityView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php deleted file mode 100644 index a7fa7797c537..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListEntitiesResponse - */ -class ListEntitiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Entities in the specified parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; - */ - private $entities; - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Entities in the specified parent zone. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Entities in the specified parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Entities in the specified parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; - * @param array<\Google\Cloud\Dataplex\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php deleted file mode 100644 index cee8197a07b9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.ListEnvironmentsRequest - */ -class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments 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. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListEnvironmentsRequest - * - * @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 name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * 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. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments 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. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments 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. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` 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. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php deleted file mode 100644 index ffc31f6b154e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListEnvironmentsResponse - */ -class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Environments under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; - */ - private $environments; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments - * Environments under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Environments under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * Environments under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; - * @param array<\Google\Cloud\Dataplex\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Environment::class); - $this->environments = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php deleted file mode 100644 index 0e4b9990461a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs 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. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` 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 = ''; - - /** - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListJobsRequest - * - * @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 name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @type int $page_size - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * 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 name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * 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. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs 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. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs 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. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` 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. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` 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; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php deleted file mode 100644 index 30ca6bba5fe7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Jobs under a given task. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; - */ - private $jobs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * Jobs under a given task. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Jobs under a given task. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Jobs under a given task. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; - * @param array<\Google\Cloud\Dataplex\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php deleted file mode 100644 index d73c320fe476..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListLakeActionsRequest - */ -class ListLakeActionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` 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 = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListLakeActionsRequest - * - * @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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` 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. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` 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; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php deleted file mode 100644 index 0e9ac3478e75..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.dataplex.v1.ListLakesRequest - */ -class ListLakesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes 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. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see DataplexServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListLakesRequest - * - * @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 name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * 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 name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * 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. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes 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. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes 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. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` 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. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php deleted file mode 100644 index 8cd74bcf1dc4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListLakesResponse - */ -class ListLakesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Lakes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; - */ - private $lakes; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Lake>|\Google\Protobuf\Internal\RepeatedField $lakes - * Lakes under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Lakes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLakes() - { - return $this->lakes; - } - - /** - * Lakes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; - * @param array<\Google\Cloud\Dataplex\V1\Lake>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLakes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Lake::class); - $this->lakes = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php deleted file mode 100644 index 4c40edf47281..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.dataplex.v1.ListPartitionsRequest - */ -class ListPartitionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` 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. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see - * {@see MetadataServiceClient::entityName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListPartitionsRequest - * - * @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 name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type int $page_size - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * @type string $page_token - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * @type string $filter - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * 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 name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * 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. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * - * 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. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` 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. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` 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. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php deleted file mode 100644 index 06a68cc7020c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListPartitionsResponse - */ -class ListPartitionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Partitions under the specified parent entity. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; - */ - private $partitions; - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Partition>|\Google\Protobuf\Internal\RepeatedField $partitions - * Partitions under the specified parent entity. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Partitions under the specified parent entity. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartitions() - { - return $this->partitions; - } - - /** - * Partitions under the specified parent entity. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; - * @param array<\Google\Cloud\Dataplex\V1\Partition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Partition::class); - $this->partitions = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php deleted file mode 100644 index be94f5019e56..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.dataplex.v1.ListSessionsRequest - */ -class ListSessionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions 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. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` 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. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. Please see - * {@see DataplexServiceClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListSessionsRequest - * - * @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 name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * @type int $page_size - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * @type string $filter - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * - * 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 name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * - * 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. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions 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. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions 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. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` 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. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` 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. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php deleted file mode 100644 index 2563a5529f20..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListSessionsResponse - */ -class ListSessionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sessions under a given environment. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; - */ - private $sessions; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Session>|\Google\Protobuf\Internal\RepeatedField $sessions - * Sessions under a given environment. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Sessions under a given environment. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSessions() - { - return $this->sessions; - } - - /** - * Sessions under a given environment. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; - * @param array<\Google\Cloud\Dataplex\V1\Session>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Session::class); - $this->sessions = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php deleted file mode 100644 index cf55741d71e1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.dataplex.v1.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks 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. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListTasksRequest - * - * @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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks 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. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks 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. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` 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. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php deleted file mode 100644 index 1adb1c8897d6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Tasks under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; - */ - private $tasks; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * Tasks under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Tasks under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * Tasks under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; - * @param array<\Google\Cloud\Dataplex\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php deleted file mode 100644 index 5a9b823e9b99..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListZoneActionsRequest - */ -class ListZoneActionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` 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 = ''; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListZoneActionsRequest - * - * @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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type int $page_size - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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 name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * 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. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions 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. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` 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. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` 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; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php deleted file mode 100644 index 7357a9f6e6c2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.dataplex.v1.ListZonesRequest - */ -class ListZonesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones 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. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListZonesRequest - * - * @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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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 name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * 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. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones 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. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones 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. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` 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. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` 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. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * 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; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php deleted file mode 100644 index 93963cfdc21b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListZonesResponse - */ -class ListZonesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Zones under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; - */ - private $zones; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Zone>|\Google\Protobuf\Internal\RepeatedField $zones - * Zones under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Zones under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getZones() - { - return $this->zones; - } - - /** - * Zones under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; - * @param array<\Google\Cloud\Dataplex\V1\Zone>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Zone::class); - $this->zones = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php deleted file mode 100644 index a324fa95f4c8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.dataplex.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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 the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php deleted file mode 100644 index 57cd119f1bb7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.dataplex.v1.Partition - */ -class Partition extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * - * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - private $values; - /** - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * - * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $location = ''; - /** - * Optional. The etag for this partition. - * - * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * @type string $location - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * @type string $etag - * Optional. The etag for this partition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * - * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * - * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - - /** - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * - * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * - * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Optional. The etag for this partition. - * - * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getEtag() - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - return $this->etag; - } - - /** - * Optional. The etag for this partition. - * - * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEtag($var) - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php deleted file mode 100644 index 21c5ac6ae057..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.dataplex.v1.ResourceAccessSpec - */ -class ResourceAccessSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $readers; - /** - * Optional. The set of principals to be granted writer role on the resource. - * - * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $writers; - /** - * Optional. The set of principals to be granted owner role on the resource. - * - * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $owners; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $readers - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $writers - * Optional. The set of principals to be granted writer role on the resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $owners - * Optional. The set of principals to be granted owner role on the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Security::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReaders() - { - return $this->readers; - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->readers = $arr; - - return $this; - } - - /** - * Optional. The set of principals to be granted writer role on the resource. - * - * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriters() - { - return $this->writers; - } - - /** - * Optional. The set of principals to be granted writer role on the resource. - * - * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->writers = $arr; - - return $this; - } - - /** - * Optional. The set of principals to be granted owner role on the resource. - * - * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOwners() - { - return $this->owners; - } - - /** - * Optional. The set of principals to be granted owner role on the resource. - * - * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOwners($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->owners = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php deleted file mode 100644 index 1b01b86683b5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.dataplex.v1.RunDataScanRequest - */ -class RunDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * - * 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 DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Only **OnDemand** data scans are allowed. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\RunDataScanRequest - * - * @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 DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * - * 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 DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * - * 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php deleted file mode 100644 index 5bdc7ae1f097..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dataplex.v1.RunDataScanResponse - */ -class RunDataScanResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataScanJob created by RunDataScan request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; - */ - protected $job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataScanJob $job - * DataScanJob created by RunDataScan request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * DataScanJob created by RunDataScan request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; - * @return \Google\Cloud\Dataplex\V1\DataScanJob|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * DataScanJob created by RunDataScan request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; - * @param \Google\Cloud\Dataplex\V1\DataScanJob $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanJob::class); - $this->job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php deleted file mode 100644 index ce2348d52af6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dataplex.v1.RunTaskRequest - */ -class RunTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - - /** - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\RunTaskRequest - * - * @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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * @type array|\Google\Protobuf\Internal\MapField $args - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * 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 task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * 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. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php deleted file mode 100644 index c13e5017fcc3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataplex.v1.RunTaskResponse - */ -class RunTaskResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Jobs created by RunTask API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; - */ - protected $job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Job $job - * Jobs created by RunTask API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Jobs created by RunTask API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; - * @return \Google\Cloud\Dataplex\V1\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Jobs created by RunTask API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; - * @param \Google\Cloud\Dataplex\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Job::class); - $this->job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php deleted file mode 100644 index 176ced6a4304..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataplex.v1.ScannedData - */ -class ScannedData extends \Google\Protobuf\Internal\Message -{ - protected $data_range; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField $incremental_field - * The range denoted by values of an incremental field - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * The range denoted by values of an incremental field - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData.IncrementalField incremental_field = 1; - * @return \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField|null - */ - public function getIncrementalField() - { - return $this->readOneof(1); - } - - public function hasIncrementalField() - { - return $this->hasOneof(1); - } - - /** - * The range denoted by values of an incremental field - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData.IncrementalField incremental_field = 1; - * @param \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField $var - * @return $this - */ - public function setIncrementalField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDataRange() - { - return $this->whichOneof("data_range"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php deleted file mode 100644 index c7ea783f0481..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dataplex.v1.ScannedData.IncrementalField - */ -class IncrementalField extends \Google\Protobuf\Internal\Message -{ - /** - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * - * Generated from protobuf field string field = 1; - */ - protected $field = ''; - /** - * Value that marks the start of the range. - * - * Generated from protobuf field string start = 2; - */ - protected $start = ''; - /** - * Value that marks the end of the range. - * - * Generated from protobuf field string end = 3; - */ - protected $end = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * @type string $start - * Value that marks the start of the range. - * @type string $end - * Value that marks the end of the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * - * Generated from protobuf field string field = 1; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * - * Generated from protobuf field string field = 1; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * Value that marks the start of the range. - * - * Generated from protobuf field string start = 2; - * @return string - */ - public function getStart() - { - return $this->start; - } - - /** - * Value that marks the start of the range. - * - * Generated from protobuf field string start = 2; - * @param string $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkString($var, True); - $this->start = $var; - - return $this; - } - - /** - * Value that marks the end of the range. - * - * Generated from protobuf field string end = 3; - * @return string - */ - public function getEnd() - { - return $this->end; - } - - /** - * Value that marks the end of the range. - * - * Generated from protobuf field string end = 3; - * @param string $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkString($var, True); - $this->end = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncrementalField::class, \Google\Cloud\Dataplex\V1\ScannedData_IncrementalField::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php deleted file mode 100644 index 40081aed1552..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.dataplex.v1.Schema - */ -class Schema extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * - * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_managed = false; - /** - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $fields; - /** - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $partition_fields; - /** - * Optional. The structure of paths containing partition data within the - * entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $partition_style = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $user_managed - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * @type array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $fields - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * @type array<\Google\Cloud\Dataplex\V1\Schema\PartitionField>|\Google\Protobuf\Internal\RepeatedField $partition_fields - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * @type int $partition_style - * Optional. The structure of paths containing partition data within the - * entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * - * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getUserManaged() - { - return $this->user_managed; - } - - /** - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * - * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setUserManaged($var) - { - GPBUtil::checkBool($var); - $this->user_managed = $var; - - return $this; - } - - /** - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\SchemaField::class); - $this->fields = $arr; - - return $this; - } - - /** - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartitionFields() - { - return $this->partition_fields; - } - - /** - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\Schema\PartitionField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartitionFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\PartitionField::class); - $this->partition_fields = $arr; - - return $this; - } - - /** - * Optional. The structure of paths containing partition data within the - * entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPartitionStyle() - { - return $this->partition_style; - } - - /** - * Optional. The structure of paths containing partition data within the - * entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPartitionStyle($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\PartitionStyle::class); - $this->partition_style = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php deleted file mode 100644 index 4f737cbbce7b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.Schema.Mode - */ -class Mode -{ - /** - * Mode unspecified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * The field has required semantics. - * - * Generated from protobuf enum REQUIRED = 1; - */ - const REQUIRED = 1; - /** - * The field has optional semantics, and may be null. - * - * Generated from protobuf enum NULLABLE = 2; - */ - const NULLABLE = 2; - /** - * The field has repeated (0 or more) semantics, and is a list of values. - * - * Generated from protobuf enum REPEATED = 3; - */ - const REPEATED = 3; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::REQUIRED => 'REQUIRED', - self::NULLABLE => 'NULLABLE', - self::REPEATED => 'REPEATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\Dataplex\V1\Schema_Mode::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php deleted file mode 100644 index 504de2911360..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.dataplex.v1.Schema.PartitionField - */ -class PartitionField extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Immutable. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * @type int $type - * Required. Immutable. The type of field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * - * 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; - } - - /** - * Required. Immutable. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Type::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionField::class, \Google\Cloud\Dataplex\V1\Schema_PartitionField::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php deleted file mode 100644 index 4162a37726fe..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.dataplex.v1.Schema.PartitionStyle - */ -class PartitionStyle -{ - /** - * PartitionStyle unspecified - * - * Generated from protobuf enum PARTITION_STYLE_UNSPECIFIED = 0; - */ - const PARTITION_STYLE_UNSPECIFIED = 0; - /** - * Partitions are hive-compatible. - * Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, - * `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. - * - * Generated from protobuf enum HIVE_COMPATIBLE = 1; - */ - const HIVE_COMPATIBLE = 1; - - private static $valueToName = [ - self::PARTITION_STYLE_UNSPECIFIED => 'PARTITION_STYLE_UNSPECIFIED', - self::HIVE_COMPATIBLE => 'HIVE_COMPATIBLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionStyle::class, \Google\Cloud\Dataplex\V1\Schema_PartitionStyle::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php deleted file mode 100644 index 5811645ddf75..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.dataplex.v1.Schema.SchemaField - */ -class SchemaField extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. Additional field semantics. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mode = 0; - /** - * Optional. Any nested field for complex types. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * @type string $description - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * @type int $type - * Required. The type of field. - * @type int $mode - * Required. Additional field semantics. - * @type array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $fields - * Optional. Any nested field for complex types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * - * 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; - } - - /** - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * - * 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; - } - - /** - * Required. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Additional field semantics. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Required. Additional field semantics. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Any nested field for complex types. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Optional. Any nested field for complex types. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\SchemaField::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchemaField::class, \Google\Cloud\Dataplex\V1\Schema_SchemaField::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php deleted file mode 100644 index 32335b4443a1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.dataplex.v1.Schema.Type - */ -class Type -{ - /** - * SchemaType unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Boolean field. - * - * Generated from protobuf enum BOOLEAN = 1; - */ - const BOOLEAN = 1; - /** - * Single byte numeric field. - * - * Generated from protobuf enum BYTE = 2; - */ - const BYTE = 2; - /** - * 16-bit numeric field. - * - * Generated from protobuf enum INT16 = 3; - */ - const INT16 = 3; - /** - * 32-bit numeric field. - * - * Generated from protobuf enum INT32 = 4; - */ - const INT32 = 4; - /** - * 64-bit numeric field. - * - * Generated from protobuf enum INT64 = 5; - */ - const INT64 = 5; - /** - * Floating point numeric field. - * - * Generated from protobuf enum FLOAT = 6; - */ - const FLOAT = 6; - /** - * Double precision numeric field. - * - * Generated from protobuf enum DOUBLE = 7; - */ - const DOUBLE = 7; - /** - * Real value numeric field. - * - * Generated from protobuf enum DECIMAL = 8; - */ - const DECIMAL = 8; - /** - * Sequence of characters field. - * - * Generated from protobuf enum STRING = 9; - */ - const STRING = 9; - /** - * Sequence of bytes field. - * - * Generated from protobuf enum BINARY = 10; - */ - const BINARY = 10; - /** - * Date and time field. - * - * Generated from protobuf enum TIMESTAMP = 11; - */ - const TIMESTAMP = 11; - /** - * Date field. - * - * Generated from protobuf enum DATE = 12; - */ - const DATE = 12; - /** - * Time field. - * - * Generated from protobuf enum TIME = 13; - */ - const TIME = 13; - /** - * Structured field. Nested fields that define the structure of the map. - * If all nested fields are nullable, this field represents a union. - * - * Generated from protobuf enum RECORD = 14; - */ - const RECORD = 14; - /** - * Null field that does not have values. - * - * Generated from protobuf enum NULL = 100; - */ - const NULL = 100; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::BOOLEAN => 'BOOLEAN', - self::BYTE => 'BYTE', - self::INT16 => 'INT16', - self::INT32 => 'INT32', - self::INT64 => 'INT64', - self::FLOAT => 'FLOAT', - self::DOUBLE => 'DOUBLE', - self::DECIMAL => 'DECIMAL', - self::STRING => 'STRING', - self::BINARY => 'BINARY', - self::TIMESTAMP => 'TIMESTAMP', - self::DATE => 'DATE', - self::TIME => 'TIME', - self::RECORD => 'RECORD', - self::NULL => 'NULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Schema_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php deleted file mode 100644 index e97bb288861b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.dataplex.v1.Session - */ -class Session extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. Email of user running the session. - * - * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $user_id = ''; - /** - * Output only. Session start time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. State of Session - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * @type string $user_id - * Output only. Email of user running the session. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Session start time. - * @type int $state - * Output only. State of Session - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Email of user running the session. - * - * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Output only. Email of user running the session. - * - * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - - /** - * Output only. Session start 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. Session start 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. State of Session - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of Session - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php deleted file mode 100644 index 7caa11fbef96..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php +++ /dev/null @@ -1,332 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent - */ -class SessionEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The information about the user that created the session. It will be the - * email address of the user. - * - * Generated from protobuf field string user_id = 2; - */ - protected $user_id = ''; - /** - * Unique identifier for the session. - * - * Generated from protobuf field string session_id = 3; - */ - protected $session_id = ''; - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; - */ - protected $type = 0; - /** - * The status of the event. - * - * Generated from protobuf field bool event_succeeded = 6; - */ - protected $event_succeeded = false; - /** - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * - * Generated from protobuf field bool fast_startup_enabled = 7; - */ - protected $fast_startup_enabled = false; - /** - * The idle duration of a warm pooled session before it is assigned to user. - * - * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; - */ - protected $unassigned_duration = null; - protected $detail; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type string $user_id - * The information about the user that created the session. It will be the - * email address of the user. - * @type string $session_id - * Unique identifier for the session. - * @type int $type - * The type of the event. - * @type \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail $query - * The execution details of the query. - * @type bool $event_succeeded - * The status of the event. - * @type bool $fast_startup_enabled - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * @type \Google\Protobuf\Duration $unassigned_duration - * The idle duration of a warm pooled session before it is assigned to user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The information about the user that created the session. It will be the - * email address of the user. - * - * Generated from protobuf field string user_id = 2; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * The information about the user that created the session. It will be the - * email address of the user. - * - * Generated from protobuf field string user_id = 2; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - - /** - * Unique identifier for the session. - * - * Generated from protobuf field string session_id = 3; - * @return string - */ - public function getSessionId() - { - return $this->session_id; - } - - /** - * Unique identifier for the session. - * - * Generated from protobuf field string session_id = 3; - * @param string $var - * @return $this - */ - public function setSessionId($var) - { - GPBUtil::checkString($var, True); - $this->session_id = $var; - - return $this; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\SessionEvent\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * The execution details of the query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail query = 5; - * @return \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail|null - */ - public function getQuery() - { - return $this->readOneof(5); - } - - public function hasQuery() - { - return $this->hasOneof(5); - } - - /** - * The execution details of the query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail query = 5; - * @param \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The status of the event. - * - * Generated from protobuf field bool event_succeeded = 6; - * @return bool - */ - public function getEventSucceeded() - { - return $this->event_succeeded; - } - - /** - * The status of the event. - * - * Generated from protobuf field bool event_succeeded = 6; - * @param bool $var - * @return $this - */ - public function setEventSucceeded($var) - { - GPBUtil::checkBool($var); - $this->event_succeeded = $var; - - return $this; - } - - /** - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * - * Generated from protobuf field bool fast_startup_enabled = 7; - * @return bool - */ - public function getFastStartupEnabled() - { - return $this->fast_startup_enabled; - } - - /** - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * - * Generated from protobuf field bool fast_startup_enabled = 7; - * @param bool $var - * @return $this - */ - public function setFastStartupEnabled($var) - { - GPBUtil::checkBool($var); - $this->fast_startup_enabled = $var; - - return $this; - } - - /** - * The idle duration of a warm pooled session before it is assigned to user. - * - * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getUnassignedDuration() - { - return $this->unassigned_duration; - } - - public function hasUnassignedDuration() - { - return isset($this->unassigned_duration); - } - - public function clearUnassignedDuration() - { - unset($this->unassigned_duration); - } - - /** - * The idle duration of a warm pooled session before it is assigned to user. - * - * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setUnassignedDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->unassigned_duration = $var; - - return $this; - } - - /** - * @return string - */ - public function getDetail() - { - return $this->whichOneof("detail"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php deleted file mode 100644 index 18b401bf2f28..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent.EventType - */ -class EventType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * Event when the session is assigned to a user. - * - * Generated from protobuf enum START = 1; - */ - const START = 1; - /** - * Event for stop of a session. - * - * Generated from protobuf enum STOP = 2; - */ - const STOP = 2; - /** - * Query events in the session. - * - * Generated from protobuf enum QUERY = 3; - */ - const QUERY = 3; - /** - * Event for creation of a cluster. It is not yet assigned to a user. - * This comes before START in the sequence - * - * Generated from protobuf enum CREATE = 4; - */ - const CREATE = 4; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::START => 'START', - self::STOP => 'STOP', - self::QUERY => 'QUERY', - self::CREATE => 'CREATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Dataplex\V1\SessionEvent_EventType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php deleted file mode 100644 index 8b5a97c33ce8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent.QueryDetail - */ -class QueryDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The unique Query id identifying the query. - * - * Generated from protobuf field string query_id = 1; - */ - protected $query_id = ''; - /** - * The query text executed. - * - * Generated from protobuf field string query_text = 2; - */ - protected $query_text = ''; - /** - * Query Execution engine. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; - */ - protected $engine = 0; - /** - * Time taken for execution of the query. - * - * Generated from protobuf field .google.protobuf.Duration duration = 4; - */ - protected $duration = null; - /** - * The size of results the query produced. - * - * Generated from protobuf field int64 result_size_bytes = 5; - */ - protected $result_size_bytes = 0; - /** - * The data processed by the query. - * - * Generated from protobuf field int64 data_processed_bytes = 6; - */ - protected $data_processed_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_id - * The unique Query id identifying the query. - * @type string $query_text - * The query text executed. - * @type int $engine - * Query Execution engine. - * @type \Google\Protobuf\Duration $duration - * Time taken for execution of the query. - * @type int|string $result_size_bytes - * The size of results the query produced. - * @type int|string $data_processed_bytes - * The data processed by the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The unique Query id identifying the query. - * - * Generated from protobuf field string query_id = 1; - * @return string - */ - public function getQueryId() - { - return $this->query_id; - } - - /** - * The unique Query id identifying the query. - * - * Generated from protobuf field string query_id = 1; - * @param string $var - * @return $this - */ - public function setQueryId($var) - { - GPBUtil::checkString($var, True); - $this->query_id = $var; - - return $this; - } - - /** - * The query text executed. - * - * Generated from protobuf field string query_text = 2; - * @return string - */ - public function getQueryText() - { - return $this->query_text; - } - - /** - * The query text executed. - * - * Generated from protobuf field string query_text = 2; - * @param string $var - * @return $this - */ - public function setQueryText($var) - { - GPBUtil::checkString($var, True); - $this->query_text = $var; - - return $this; - } - - /** - * Query Execution engine. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; - * @return int - */ - public function getEngine() - { - return $this->engine; - } - - /** - * Query Execution engine. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; - * @param int $var - * @return $this - */ - public function setEngine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail\Engine::class); - $this->engine = $var; - - return $this; - } - - /** - * Time taken for execution of the query. - * - * Generated from protobuf field .google.protobuf.Duration duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Time taken for execution of the query. - * - * Generated from protobuf field .google.protobuf.Duration duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * The size of results the query produced. - * - * Generated from protobuf field int64 result_size_bytes = 5; - * @return int|string - */ - public function getResultSizeBytes() - { - return $this->result_size_bytes; - } - - /** - * The size of results the query produced. - * - * Generated from protobuf field int64 result_size_bytes = 5; - * @param int|string $var - * @return $this - */ - public function setResultSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->result_size_bytes = $var; - - return $this; - } - - /** - * The data processed by the query. - * - * Generated from protobuf field int64 data_processed_bytes = 6; - * @return int|string - */ - public function getDataProcessedBytes() - { - return $this->data_processed_bytes; - } - - /** - * The data processed by the query. - * - * Generated from protobuf field int64 data_processed_bytes = 6; - * @param int|string $var - * @return $this - */ - public function setDataProcessedBytes($var) - { - GPBUtil::checkInt64($var); - $this->data_processed_bytes = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryDetail::class, \Google\Cloud\Dataplex\V1\SessionEvent_QueryDetail::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php deleted file mode 100644 index 6f64026a6ac4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine - */ -class Engine -{ - /** - * An unspecified Engine type. - * - * Generated from protobuf enum ENGINE_UNSPECIFIED = 0; - */ - const ENGINE_UNSPECIFIED = 0; - /** - * Spark-sql engine is specified in Query. - * - * Generated from protobuf enum SPARK_SQL = 1; - */ - const SPARK_SQL = 1; - /** - * BigQuery engine is specified in Query. - * - * Generated from protobuf enum BIGQUERY = 2; - */ - const BIGQUERY = 2; - - private static $valueToName = [ - self::ENGINE_UNSPECIFIED => 'ENGINE_UNSPECIFIED', - self::SPARK_SQL => 'SPARK_SQL', - self::BIGQUERY => 'BIGQUERY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Engine::class, \Google\Cloud\Dataplex\V1\SessionEvent_QueryDetail_Engine::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php deleted file mode 100644 index 1bd046ff27a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataplex.v1.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Resource is active, i.e., ready to use. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Resource is under creation. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Resource is under deletion. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Resource is active but has unresolved actions. - * - * Generated from protobuf enum ACTION_REQUIRED = 4; - */ - const ACTION_REQUIRED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::ACTION_REQUIRED => 'ACTION_REQUIRED', - ]; - - 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/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php deleted file mode 100644 index 45665e6e1936..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.StorageAccess - */ -class StorageAccess extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $read = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $read - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRead() - { - return $this->read; - } - - /** - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRead($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageAccess\AccessMode::class); - $this->read = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php deleted file mode 100644 index 94316b5dfff7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.StorageAccess.AccessMode - */ -class AccessMode -{ - /** - * Access mode unspecified. - * - * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; - */ - const ACCESS_MODE_UNSPECIFIED = 0; - /** - * Default. Data is accessed directly using storage APIs. - * - * Generated from protobuf enum DIRECT = 1; - */ - const DIRECT = 1; - /** - * Data is accessed through a managed interface using BigQuery APIs. - * - * Generated from protobuf enum MANAGED = 2; - */ - const MANAGED = 2; - - private static $valueToName = [ - self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_MODE_UNSPECIFIED', - self::DIRECT => 'DIRECT', - self::MANAGED => 'MANAGED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessMode::class, \Google\Cloud\Dataplex\V1\StorageAccess_AccessMode::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php deleted file mode 100644 index 8b8964f3d7a6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat - */ -class StorageFormat extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $format = 0; - /** - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $compression_format = 0; - /** - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mime_type = ''; - protected $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $format - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * @type int $compression_format - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * @type string $mime_type - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * @type \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $csv - * Optional. Additional information about CSV formatted data. - * @type \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $json - * Optional. Additional information about CSV formatted data. - * @type \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $iceberg - * Optional. Additional information about iceberg tables. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\Format::class); - $this->format = $var; - - return $this; - } - - /** - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCompressionFormat() - { - return $this->compression_format; - } - - /** - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCompressionFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\CompressionFormat::class); - $this->compression_format = $var; - - return $this; - } - - /** - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions|null - */ - public function getCsv() - { - return $this->readOneof(10); - } - - public function hasCsv() - { - return $this->hasOneof(10); - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $var - * @return $this - */ - public function setCsv($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions|null - */ - public function getJson() - { - return $this->readOneof(11); - } - - public function hasJson() - { - return $this->hasOneof(11); - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $var - * @return $this - */ - public function setJson($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Optional. Additional information about iceberg tables. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions|null - */ - public function getIceberg() - { - return $this->readOneof(12); - } - - public function hasIceberg() - { - return $this->hasOneof(12); - } - - /** - * Optional. Additional information about iceberg tables. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $var - * @return $this - */ - public function setIceberg($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * @return string - */ - public function getOptions() - { - return $this->whichOneof("options"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php deleted file mode 100644 index fa802d137dae..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.CompressionFormat - */ -class CompressionFormat -{ - /** - * CompressionFormat unspecified. Implies uncompressed data. - * - * Generated from protobuf enum COMPRESSION_FORMAT_UNSPECIFIED = 0; - */ - const COMPRESSION_FORMAT_UNSPECIFIED = 0; - /** - * GZip compressed set of files. - * - * Generated from protobuf enum GZIP = 2; - */ - const GZIP = 2; - /** - * BZip2 compressed set of files. - * - * Generated from protobuf enum BZIP2 = 3; - */ - const BZIP2 = 3; - - private static $valueToName = [ - self::COMPRESSION_FORMAT_UNSPECIFIED => 'COMPRESSION_FORMAT_UNSPECIFIED', - self::GZIP => 'GZIP', - self::BZIP2 => 'BZIP2', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompressionFormat::class, \Google\Cloud\Dataplex\V1\StorageFormat_CompressionFormat::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php deleted file mode 100644 index 003e9f882b4f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.CsvOptions - */ -class CsvOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * - * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header_rows = 0; - /** - * Optional. The delimiter used to separate values. Defaults to ','. - * - * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * - * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $quote = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * @type int $header_rows - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * @type string $delimiter - * Optional. The delimiter used to separate values. Defaults to ','. - * @type string $quote - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * - * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * - * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHeaderRows($var) - { - GPBUtil::checkInt32($var); - $this->header_rows = $var; - - return $this; - } - - /** - * Optional. The delimiter used to separate values. Defaults to ','. - * - * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. The delimiter used to separate values. Defaults to ','. - * - * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * - * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQuote() - { - return $this->quote; - } - - /** - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * - * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQuote($var) - { - GPBUtil::checkString($var, True); - $this->quote = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_CsvOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php deleted file mode 100644 index 3ac0249405c8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.Format - */ -class Format -{ - /** - * Format unspecified. - * - * Generated from protobuf enum FORMAT_UNSPECIFIED = 0; - */ - const FORMAT_UNSPECIFIED = 0; - /** - * Parquet-formatted structured data. - * - * Generated from protobuf enum PARQUET = 1; - */ - const PARQUET = 1; - /** - * Avro-formatted structured data. - * - * Generated from protobuf enum AVRO = 2; - */ - const AVRO = 2; - /** - * Orc-formatted structured data. - * - * Generated from protobuf enum ORC = 3; - */ - const ORC = 3; - /** - * Csv-formatted semi-structured data. - * - * Generated from protobuf enum CSV = 100; - */ - const CSV = 100; - /** - * Json-formatted semi-structured data. - * - * Generated from protobuf enum JSON = 101; - */ - const JSON = 101; - /** - * Image data formats (such as jpg and png). - * - * Generated from protobuf enum IMAGE = 200; - */ - const IMAGE = 200; - /** - * Audio data formats (such as mp3, and wav). - * - * Generated from protobuf enum AUDIO = 201; - */ - const AUDIO = 201; - /** - * Video data formats (such as mp4 and mpg). - * - * Generated from protobuf enum VIDEO = 202; - */ - const VIDEO = 202; - /** - * Textual data formats (such as txt and xml). - * - * Generated from protobuf enum TEXT = 203; - */ - const TEXT = 203; - /** - * TensorFlow record format. - * - * Generated from protobuf enum TFRECORD = 204; - */ - const TFRECORD = 204; - /** - * Data that doesn't match a specific format. - * - * Generated from protobuf enum OTHER = 1000; - */ - const OTHER = 1000; - /** - * Data of an unknown format. - * - * Generated from protobuf enum UNKNOWN = 1001; - */ - const UNKNOWN = 1001; - - private static $valueToName = [ - self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED', - self::PARQUET => 'PARQUET', - self::AVRO => 'AVRO', - self::ORC => 'ORC', - self::CSV => 'CSV', - self::JSON => 'JSON', - self::IMAGE => 'IMAGE', - self::AUDIO => 'AUDIO', - self::VIDEO => 'VIDEO', - self::TEXT => 'TEXT', - self::TFRECORD => 'TFRECORD', - self::OTHER => 'OTHER', - self::UNKNOWN => 'UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Format::class, \Google\Cloud\Dataplex\V1\StorageFormat_Format::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php deleted file mode 100644 index 7470657b6049..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.IcebergOptions - */ -class IcebergOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * - * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metadata_location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metadata_location - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * - * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMetadataLocation() - { - return $this->metadata_location; - } - - /** - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * - * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMetadataLocation($var) - { - GPBUtil::checkString($var, True); - $this->metadata_location = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IcebergOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_IcebergOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php deleted file mode 100644 index 177947e65192..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.JsonOptions - */ -class JsonOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_JsonOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php deleted file mode 100644 index e5483839dc93..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.dataplex.v1.StorageSystem - */ -class StorageSystem -{ - /** - * Storage system unspecified. - * - * Generated from protobuf enum STORAGE_SYSTEM_UNSPECIFIED = 0; - */ - const STORAGE_SYSTEM_UNSPECIFIED = 0; - /** - * The entity data is contained within a Cloud Storage bucket. - * - * Generated from protobuf enum CLOUD_STORAGE = 1; - */ - const CLOUD_STORAGE = 1; - /** - * The entity data is contained within a BigQuery dataset. - * - * Generated from protobuf enum BIGQUERY = 2; - */ - const BIGQUERY = 2; - - private static $valueToName = [ - self::STORAGE_SYSTEM_UNSPECIFIED => 'STORAGE_SYSTEM_UNSPECIFIED', - self::CLOUD_STORAGE => 'CLOUD_STORAGE', - self::BIGQUERY => 'BIGQUERY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php deleted file mode 100644 index 59b952e8fcd2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php +++ /dev/null @@ -1,544 +0,0 @@ -google.cloud.dataplex.v1.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the task was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the task was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the task. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. Current state of the task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. User-defined labels for the task. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. Spec related to how often and when a task should be triggered. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trigger_spec = null; - /** - * Required. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $execution_spec = null; - /** - * Output only. Status of the latest task executions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_status = null; - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * @type string $uid - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the task was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the task was last updated. - * @type string $description - * Optional. Description of the task. - * @type string $display_name - * Optional. User friendly display name. - * @type int $state - * Output only. Current state of the task. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the task. - * @type \Google\Cloud\Dataplex\V1\Task\TriggerSpec $trigger_spec - * Required. Spec related to how often and when a task should be triggered. - * @type \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $execution_spec - * Required. Spec related to how a task is executed. - * @type \Google\Cloud\Dataplex\V1\Task\ExecutionStatus $execution_status - * Output only. Status of the latest task executions. - * @type \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig $spark - * Config related to running custom Spark tasks. - * @type \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig $notebook - * Config related to running scheduled Notebooks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the task was created. - * - * 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. The time when the task was created. - * - * 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. The time when the task was last updated. - * - * 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. The time when the task was last updated. - * - * 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. Description of the task. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the task. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Current state of the task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the task. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the task. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Spec related to how often and when a task should be triggered. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task\TriggerSpec|null - */ - public function getTriggerSpec() - { - return $this->trigger_spec; - } - - public function hasTriggerSpec() - { - return isset($this->trigger_spec); - } - - public function clearTriggerSpec() - { - unset($this->trigger_spec); - } - - /** - * Required. Spec related to how often and when a task should be triggered. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task\TriggerSpec $var - * @return $this - */ - public function setTriggerSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\TriggerSpec::class); - $this->trigger_spec = $var; - - return $this; - } - - /** - * Required. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task\ExecutionSpec|null - */ - public function getExecutionSpec() - { - return $this->execution_spec; - } - - public function hasExecutionSpec() - { - return isset($this->execution_spec); - } - - public function clearExecutionSpec() - { - unset($this->execution_spec); - } - - /** - * Required. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $var - * @return $this - */ - public function setExecutionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionSpec::class); - $this->execution_spec = $var; - - return $this; - } - - /** - * Output only. Status of the latest task executions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Task\ExecutionStatus|null - */ - public function getExecutionStatus() - { - return $this->execution_status; - } - - public function hasExecutionStatus() - { - return isset($this->execution_status); - } - - public function clearExecutionStatus() - { - unset($this->execution_status); - } - - /** - * Output only. Status of the latest task executions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Task\ExecutionStatus $var - * @return $this - */ - public function setExecutionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionStatus::class); - $this->execution_status = $var; - - return $this; - } - - /** - * Config related to running custom Spark tasks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.SparkTaskConfig spark = 300; - * @return \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig|null - */ - public function getSpark() - { - return $this->readOneof(300); - } - - public function hasSpark() - { - return $this->hasOneof(300); - } - - /** - * Config related to running custom Spark tasks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.SparkTaskConfig spark = 300; - * @param \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig $var - * @return $this - */ - public function setSpark($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig::class); - $this->writeOneof(300, $var); - - return $this; - } - - /** - * Config related to running scheduled Notebooks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; - * @return \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig|null - */ - public function getNotebook() - { - return $this->readOneof(302); - } - - public function hasNotebook() - { - return $this->hasOneof(302); - } - - /** - * Config related to running scheduled Notebooks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; - * @param \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig $var - * @return $this - */ - public function setNotebook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig::class); - $this->writeOneof(302, $var); - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php deleted file mode 100644 index 83af80d663e7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php +++ /dev/null @@ -1,284 +0,0 @@ -google.cloud.dataplex.v1.Task.ExecutionSpec - */ -class ExecutionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_account = ''; - /** - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * - * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $project = ''; - /** - * Optional. The maximum duration after which the job execution is expired. - * - * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_job_execution_lifetime = null; - /** - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * - * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $args - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * @type string $service_account - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * @type string $project - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * @type \Google\Protobuf\Duration $max_job_execution_lifetime - * Optional. The maximum duration after which the job execution is expired. - * @type string $kms_key - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * - * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * - * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Optional. The maximum duration after which the job execution is expired. - * - * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxJobExecutionLifetime() - { - return $this->max_job_execution_lifetime; - } - - public function hasMaxJobExecutionLifetime() - { - return isset($this->max_job_execution_lifetime); - } - - public function clearMaxJobExecutionLifetime() - { - unset($this->max_job_execution_lifetime); - } - - /** - * Optional. The maximum duration after which the job execution is expired. - * - * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxJobExecutionLifetime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_job_execution_lifetime = $var; - - return $this; - } - - /** - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * - * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * - * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionSpec::class, \Google\Cloud\Dataplex\V1\Task_ExecutionSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php deleted file mode 100644 index 2abbc0a85df9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.Task.ExecutionStatus - */ -class ExecutionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. latest job execution - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of the status. - * @type \Google\Cloud\Dataplex\V1\Job $latest_job - * Output only. latest job execution - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. latest job execution - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Job|null - */ - public function getLatestJob() - { - return $this->latest_job; - } - - public function hasLatestJob() - { - return isset($this->latest_job); - } - - public function clearLatestJob() - { - unset($this->latest_job); - } - - /** - * Output only. latest job execution - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Job $var - * @return $this - */ - public function setLatestJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Job::class); - $this->latest_job = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionStatus::class, \Google\Cloud\Dataplex\V1\Task_ExecutionStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php deleted file mode 100644 index 3cde74d13131..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec - */ -class InfrastructureSpec extends \Google\Protobuf\Internal\Message -{ - protected $resources; - protected $runtime; - protected $network; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $batch - * Compute resources needed for a Task when using Dataproc Serverless. - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $container_image - * Container Image Runtime Configuration. - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $vpc_network - * Vpc network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Compute resources needed for a Task when using Dataproc Serverless. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources|null - */ - public function getBatch() - { - return $this->readOneof(52); - } - - public function hasBatch() - { - return $this->hasOneof(52); - } - - /** - * Compute resources needed for a Task when using Dataproc Serverless. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $var - * @return $this - */ - public function setBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources::class); - $this->writeOneof(52, $var); - - return $this; - } - - /** - * Container Image Runtime Configuration. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime|null - */ - public function getContainerImage() - { - return $this->readOneof(101); - } - - public function hasContainerImage() - { - return $this->hasOneof(101); - } - - /** - * Container Image Runtime Configuration. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Vpc network. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork|null - */ - public function getVpcNetwork() - { - return $this->readOneof(150); - } - - public function hasVpcNetwork() - { - return $this->hasOneof(150); - } - - /** - * Vpc network. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork::class); - $this->writeOneof(150, $var); - - return $this; - } - - /** - * @return string - */ - public function getResources() - { - return $this->whichOneof("resources"); - } - - /** - * @return string - */ - public function getRuntime() - { - return $this->whichOneof("runtime"); - } - - /** - * @return string - */ - public function getNetwork() - { - return $this->whichOneof("network"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InfrastructureSpec::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php deleted file mode 100644 index 17bcd03b03df..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - */ -class BatchComputeResources extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * - * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $executors_count = 0; - /** - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * - * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_executors_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $executors_count - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * @type int $max_executors_count - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * - * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getExecutorsCount() - { - return $this->executors_count; - } - - /** - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * - * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setExecutorsCount($var) - { - GPBUtil::checkInt32($var); - $this->executors_count = $var; - - return $this; - } - - /** - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * - * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxExecutorsCount() - { - return $this->max_executors_count; - } - - /** - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * - * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxExecutorsCount($var) - { - GPBUtil::checkInt32($var); - $this->max_executors_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BatchComputeResources::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_BatchComputeResources::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php deleted file mode 100644 index ea2a1ab8c5d3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - */ -class ContainerImageRuntime extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Container image to use. - * - * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image = ''; - /** - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $java_jars; - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $python_packages; - /** - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image - * Optional. Container image to use. - * @type array|\Google\Protobuf\Internal\RepeatedField $java_jars - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * @type array|\Google\Protobuf\Internal\RepeatedField $python_packages - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Container image to use. - * - * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * Optional. Container image to use. - * - * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkString($var, True); - $this->image = $var; - - return $this; - } - - /** - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJavaJars() - { - return $this->java_jars; - } - - /** - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJavaJars($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->java_jars = $arr; - - return $this; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPythonPackages() - { - return $this->python_packages; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPythonPackages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->python_packages = $arr; - - return $this; - } - - /** - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContainerImageRuntime::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_ContainerImageRuntime::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php deleted file mode 100644 index a276c3e7ee3f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - */ -class VpcNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of network tags to apply to the job. - * - * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $network_tags; - protected $network_name; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Optional. The Cloud VPC network in which the job is run. By default, - * the Cloud VPC network named Default within the project is used. - * @type string $sub_network - * Optional. The Cloud VPC sub-network in which the job is run. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * Optional. List of network tags to apply to the job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Cloud VPC network in which the job is run. By default, - * the Cloud VPC network named Default within the project is used. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->readOneof(1); - } - - public function hasNetwork() - { - return $this->hasOneof(1); - } - - /** - * Optional. The Cloud VPC network in which the job is run. By default, - * the Cloud VPC network named Default within the project is used. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. The Cloud VPC sub-network in which the job is run. - * - * Generated from protobuf field string sub_network = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubNetwork() - { - return $this->readOneof(2); - } - - public function hasSubNetwork() - { - return $this->hasOneof(2); - } - - /** - * Optional. The Cloud VPC sub-network in which the job is run. - * - * Generated from protobuf field string sub_network = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubNetwork($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. List of network tags to apply to the job. - * - * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * Optional. List of network tags to apply to the job. - * - * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * @return string - */ - public function getNetworkName() - { - return $this->whichOneof("network_name"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VpcNetwork::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_VpcNetwork::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php deleted file mode 100644 index b3c61eecd7aa..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dataplex.v1.Task.NotebookTaskConfig - */ -class NotebookTaskConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * - * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notebook = ''; - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $infrastructure_spec = null; - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebook - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $infrastructure_spec - * Optional. Infrastructure specification for the execution. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * - * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNotebook() - { - return $this->notebook; - } - - /** - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * - * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNotebook($var) - { - GPBUtil::checkString($var, True); - $this->notebook = $var; - - return $this; - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec|null - */ - public function getInfrastructureSpec() - { - return $this->infrastructure_spec; - } - - public function hasInfrastructureSpec() - { - return isset($this->infrastructure_spec); - } - - public function clearInfrastructureSpec() - { - unset($this->infrastructure_spec); - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $var - * @return $this - */ - public function setInfrastructureSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec::class); - $this->infrastructure_spec = $var; - - return $this; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NotebookTaskConfig::class, \Google\Cloud\Dataplex\V1\Task_NotebookTaskConfig::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php deleted file mode 100644 index 48bab1ddccf1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php +++ /dev/null @@ -1,373 +0,0 @@ -google.cloud.dataplex.v1.Task.SparkTaskConfig - */ -class SparkTaskConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $infrastructure_spec = null; - protected $driver; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_jar_file_uri - * The Cloud Storage URI of the jar file that contains the main class. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * @type string $main_class - * The name of the driver's main class. The jar file that contains the - * class must be in the default CLASSPATH or specified in - * `jar_file_uris`. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * @type string $python_script_file - * The Gcloud Storage URI of the main Python file to use as the driver. - * Must be a .py file. The execution args are passed in as a sequence of - * named process arguments (`--key=value`). - * @type string $sql_script_file - * A reference to a query file. This can be the Cloud Storage URI of the - * query file or it can the path to a SqlScript Content. The execution - * args are used to declare a set of script variables - * (`set key="value";`). - * @type string $sql_script - * The query text. - * The execution args are used to declare a set of script variables - * (`set key="value";`). - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $infrastructure_spec - * Optional. Infrastructure specification for the execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage URI of the jar file that contains the main class. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_jar_file_uri = 100; - * @return string - */ - public function getMainJarFileUri() - { - return $this->readOneof(100); - } - - public function hasMainJarFileUri() - { - return $this->hasOneof(100); - } - - /** - * The Cloud Storage URI of the jar file that contains the main class. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_jar_file_uri = 100; - * @param string $var - * @return $this - */ - public function setMainJarFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * The name of the driver's main class. The jar file that contains the - * class must be in the default CLASSPATH or specified in - * `jar_file_uris`. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_class = 101; - * @return string - */ - public function getMainClass() - { - return $this->readOneof(101); - } - - public function hasMainClass() - { - return $this->hasOneof(101); - } - - /** - * The name of the driver's main class. The jar file that contains the - * class must be in the default CLASSPATH or specified in - * `jar_file_uris`. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_class = 101; - * @param string $var - * @return $this - */ - public function setMainClass($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * The Gcloud Storage URI of the main Python file to use as the driver. - * Must be a .py file. The execution args are passed in as a sequence of - * named process arguments (`--key=value`). - * - * Generated from protobuf field string python_script_file = 102; - * @return string - */ - public function getPythonScriptFile() - { - return $this->readOneof(102); - } - - public function hasPythonScriptFile() - { - return $this->hasOneof(102); - } - - /** - * The Gcloud Storage URI of the main Python file to use as the driver. - * Must be a .py file. The execution args are passed in as a sequence of - * named process arguments (`--key=value`). - * - * Generated from protobuf field string python_script_file = 102; - * @param string $var - * @return $this - */ - public function setPythonScriptFile($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * A reference to a query file. This can be the Cloud Storage URI of the - * query file or it can the path to a SqlScript Content. The execution - * args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script_file = 104; - * @return string - */ - public function getSqlScriptFile() - { - return $this->readOneof(104); - } - - public function hasSqlScriptFile() - { - return $this->hasOneof(104); - } - - /** - * A reference to a query file. This can be the Cloud Storage URI of the - * query file or it can the path to a SqlScript Content. The execution - * args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script_file = 104; - * @param string $var - * @return $this - */ - public function setSqlScriptFile($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(104, $var); - - return $this; - } - - /** - * The query text. - * The execution args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script = 105; - * @return string - */ - public function getSqlScript() - { - return $this->readOneof(105); - } - - public function hasSqlScript() - { - return $this->hasOneof(105); - } - - /** - * The query text. - * The execution args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script = 105; - * @param string $var - * @return $this - */ - public function setSqlScript($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(105, $var); - - return $this; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec|null - */ - public function getInfrastructureSpec() - { - return $this->infrastructure_spec; - } - - public function hasInfrastructureSpec() - { - return isset($this->infrastructure_spec); - } - - public function clearInfrastructureSpec() - { - unset($this->infrastructure_spec); - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $var - * @return $this - */ - public function setInfrastructureSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec::class); - $this->infrastructure_spec = $var; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->whichOneof("driver"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SparkTaskConfig::class, \Google\Cloud\Dataplex\V1\Task_SparkTaskConfig::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php deleted file mode 100644 index dc0980070345..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.dataplex.v1.Task.TriggerSpec - */ -class TriggerSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. Trigger type of the user-specified Task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $start_time = null; - /** - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * - * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_retries = 0; - protected $trigger; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. Immutable. Trigger type of the user-specified Task. - * @type \Google\Protobuf\Timestamp $start_time - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * @type bool $disabled - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * @type int $max_retries - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * @type string $schedule - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running tasks periodically. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid - * string from IANA time zone database. For example, - * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - * *`. This field is required for RECURRING tasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. Trigger type of the user-specified Task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. Trigger type of the user-specified Task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * - * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxRetries() - { - return $this->max_retries; - } - - /** - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * - * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxRetries($var) - { - GPBUtil::checkInt32($var); - $this->max_retries = $var; - - return $this; - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running tasks periodically. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid - * string from IANA time zone database. For example, - * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - * *`. This field is required for RECURRING tasks. - * - * Generated from protobuf field string schedule = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSchedule() - { - return $this->readOneof(100); - } - - public function hasSchedule() - { - return $this->hasOneof(100); - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running tasks periodically. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid - * string from IANA time zone database. For example, - * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - * *`. This field is required for RECURRING tasks. - * - * Generated from protobuf field string schedule = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * @return string - */ - public function getTrigger() - { - return $this->whichOneof("trigger"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TriggerSpec::class, \Google\Cloud\Dataplex\V1\Task_TriggerSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php deleted file mode 100644 index c9aaf3812924..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Task.TriggerSpec.Type - */ -class Type -{ - /** - * Unspecified trigger type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * The task runs one-time shortly after Task Creation. - * - * Generated from protobuf enum ON_DEMAND = 1; - */ - const ON_DEMAND = 1; - /** - * The task is scheduled to run periodically. - * - * Generated from protobuf enum RECURRING = 2; - */ - const RECURRING = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::ON_DEMAND => 'ON_DEMAND', - self::RECURRING => 'RECURRING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Task_TriggerSpec_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php deleted file mode 100644 index 2e7aa5b11786..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dataplex.v1.Trigger - */ -class Trigger extends \Google\Protobuf\Internal\Message -{ - protected $mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Trigger\OnDemand $on_demand - * The scan runs once via `RunDataScan` API. - * @type \Google\Cloud\Dataplex\V1\Trigger\Schedule $schedule - * The scan is scheduled to run periodically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * The scan runs once via `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.OnDemand on_demand = 100; - * @return \Google\Cloud\Dataplex\V1\Trigger\OnDemand|null - */ - public function getOnDemand() - { - return $this->readOneof(100); - } - - public function hasOnDemand() - { - return $this->hasOneof(100); - } - - /** - * The scan runs once via `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.OnDemand on_demand = 100; - * @param \Google\Cloud\Dataplex\V1\Trigger\OnDemand $var - * @return $this - */ - public function setOnDemand($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger\OnDemand::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * The scan is scheduled to run periodically. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.Schedule schedule = 101; - * @return \Google\Cloud\Dataplex\V1\Trigger\Schedule|null - */ - public function getSchedule() - { - return $this->readOneof(101); - } - - public function hasSchedule() - { - return $this->hasOneof(101); - } - - /** - * The scan is scheduled to run periodically. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.Schedule schedule = 101; - * @param \Google\Cloud\Dataplex\V1\Trigger\Schedule $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger\Schedule::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php deleted file mode 100644 index 610340b74866..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Trigger.OnDemand - */ -class OnDemand extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OnDemand::class, \Google\Cloud\Dataplex\V1\Trigger_OnDemand::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php deleted file mode 100644 index af91f3470b71..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dataplex.v1.Trigger.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * - * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cron = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cron - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * - * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCron() - { - return $this->cron; - } - - /** - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * - * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCron($var) - { - GPBUtil::checkString($var, True); - $this->cron = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Schedule::class, \Google\Cloud\Dataplex\V1\Trigger_Schedule::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php deleted file mode 100644 index f421fa15d2da..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateAssetRequest - */ -class UpdateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Asset $asset Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateAssetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Asset $asset, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAsset($asset) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Asset $asset - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php deleted file mode 100644 index 8cfa2d28aa8c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateContentRequest - */ -class UpdateContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $content = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Content $content Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateContentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Content $content, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setContent($content) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Content $content - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Content|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Content $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content::class); - $this->content = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php deleted file mode 100644 index 5287c980b60d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - */ -class UpdateDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_binding = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding Required. Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataAttributeBindingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataAttributeBinding($dataAttributeBinding) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\DataAttributeBinding $data_attribute_binding - * Required. Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding|null - */ - public function getDataAttributeBinding() - { - return $this->data_attribute_binding; - } - - public function hasDataAttributeBinding() - { - return isset($this->data_attribute_binding); - } - - public function clearDataAttributeBinding() - { - unset($this->data_attribute_binding); - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $var - * @return $this - */ - public function setDataAttributeBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); - $this->data_attribute_binding = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php deleted file mode 100644 index c9f4468b8962..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataAttributeRequest - */ -class UpdateDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute Required. Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataAttributeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataAttribute($dataAttribute) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\DataAttribute $data_attribute - * Required. Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttribute|null - */ - public function getDataAttribute() - { - return $this->data_attribute; - } - - public function hasDataAttribute() - { - return isset($this->data_attribute); - } - - public function clearDataAttribute() - { - unset($this->data_attribute); - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttribute $var - * @return $this - */ - public function setDataAttribute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttribute::class); - $this->data_attribute = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php deleted file mode 100644 index 5604a49c4fcd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataScanRequest - */ -class UpdateDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_scan = null; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataScan $dataScan Required. DataScan resource to be updated. - * - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataScanRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataScan $dataScan, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataScan $data_scan - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataScan|null - */ - public function getDataScan() - { - return $this->data_scan; - } - - public function hasDataScan() - { - return isset($this->data_scan); - } - - public function clearDataScan() - { - unset($this->data_scan); - } - - /** - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataScan $var - * @return $this - */ - public function setDataScan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan::class); - $this->data_scan = $var; - - return $this; - } - - /** - * Required. Mask 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. Mask 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; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php deleted file mode 100644 index ccd50e68d9f3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - */ -class UpdateDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_taxonomy = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy Required. Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataTaxonomyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataTaxonomy($dataTaxonomy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\DataTaxonomy $data_taxonomy - * Required. Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataTaxonomy|null - */ - public function getDataTaxonomy() - { - return $this->data_taxonomy; - } - - public function hasDataTaxonomy() - { - return isset($this->data_taxonomy); - } - - public function clearDataTaxonomy() - { - unset($this->data_taxonomy); - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $var - * @return $this - */ - public function setDataTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); - $this->data_taxonomy = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php deleted file mode 100644 index 5f94268620ee..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dataplex.v1.UpdateEntityRequest - */ -class UpdateEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Update description. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Entity $entity - * Required. Update description. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. Update description. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Required. Update description. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php deleted file mode 100644 index 18909b9f1a6f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateEnvironmentRequest - */ -class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Environment $environment Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateEnvironmentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Environment $environment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEnvironment($environment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Environment $environment - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php deleted file mode 100644 index c5c44f9d47d7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateLakeRequest - */ -class UpdateLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lake = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Lake $lake Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateLakeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Lake $lake, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setLake($lake) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Lake $lake - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Lake|null - */ - public function getLake() - { - return $this->lake; - } - - public function hasLake() - { - return isset($this->lake); - } - - public function clearLake() - { - unset($this->lake); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Lake $var - * @return $this - */ - public function setLake($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake::class); - $this->lake = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php deleted file mode 100644 index 5d56568c9c29..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateTaskRequest - */ -class UpdateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Task $task Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateTaskRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Task $task, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTask($task) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Task $task - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task::class); - $this->task = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php deleted file mode 100644 index 9b7a5d586fa7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateZoneRequest - */ -class UpdateZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $zone = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Zone $zone Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateZoneRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Zone $zone, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setZone($zone) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Zone $zone - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Zone|null - */ - public function getZone() - { - return $this->zone; - } - - public function hasZone() - { - return isset($this->zone); - } - - public function clearZone() - { - unset($this->zone); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Zone $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone::class); - $this->zone = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php deleted file mode 100644 index 271b517cd808..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php +++ /dev/null @@ -1,510 +0,0 @@ -google.cloud.dataplex.v1.Zone - */ -class Zone extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the zone 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 when the zone was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the zone. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the zone. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Immutable. The type of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Optional. Specification of the discovery feature applied to data in this - * zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $discovery_spec = null; - /** - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_spec = null; - /** - * Output only. Aggregated status of the underlying assets of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the zone was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the zone was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the zone. - * @type string $description - * Optional. Description of the zone. - * @type int $state - * Output only. Current state of the zone. - * @type int $type - * Required. Immutable. The type of the zone. - * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec $discovery_spec - * Optional. Specification of the discovery feature applied to data in this - * zone. - * @type \Google\Cloud\Dataplex\V1\Zone\ResourceSpec $resource_spec - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * @type \Google\Cloud\Dataplex\V1\AssetStatus $asset_status - * Output only. Aggregated status of the underlying assets of the zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the zone 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 when the zone 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 when the zone 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 when the zone 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; - } - - /** - * Optional. User defined labels for the zone. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the zone. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the zone. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the zone. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Immutable. The type of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. The type of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Zone\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. Specification of the discovery feature applied to data in this - * zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec|null - */ - public function getDiscoverySpec() - { - return $this->discovery_spec; - } - - public function hasDiscoverySpec() - { - return isset($this->discovery_spec); - } - - public function clearDiscoverySpec() - { - unset($this->discovery_spec); - } - - /** - * Optional. Specification of the discovery feature applied to data in this - * zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec $var - * @return $this - */ - public function setDiscoverySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec::class); - $this->discovery_spec = $var; - - return $this; - } - - /** - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Zone\ResourceSpec|null - */ - public function getResourceSpec() - { - return $this->resource_spec; - } - - public function hasResourceSpec() - { - return isset($this->resource_spec); - } - - public function clearResourceSpec() - { - unset($this->resource_spec); - } - - /** - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Zone\ResourceSpec $var - * @return $this - */ - public function setResourceSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\ResourceSpec::class); - $this->resource_spec = $var; - - return $this; - } - - /** - * Output only. Aggregated status of the underlying assets of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\AssetStatus|null - */ - public function getAssetStatus() - { - return $this->asset_status; - } - - public function hasAssetStatus() - { - return isset($this->asset_status); - } - - public function clearAssetStatus() - { - unset($this->asset_status); - } - - /** - * Output only. Aggregated status of the underlying assets of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\AssetStatus $var - * @return $this - */ - public function setAssetStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AssetStatus::class); - $this->asset_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php deleted file mode 100644 index 798a3a5f6b4a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.dataplex.v1.Zone.DiscoverySpec - */ -class DiscoverySpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $enabled = false; - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_patterns; - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclude_patterns; - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $csv_options = null; - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $json_options = null; - protected $trigger; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Required. Whether discovery is enabled. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_patterns - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_patterns - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions $csv_options - * Optional. Configuration for CSV data. - * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions $json_options - * Optional. Configuration for Json data. - * @type string $schedule - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Required. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludePatterns() - { - return $this->include_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_patterns = $arr; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludePatterns() - { - return $this->exclude_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclude_patterns = $arr; - - return $this; - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions|null - */ - public function getCsvOptions() - { - return $this->csv_options; - } - - public function hasCsvOptions() - { - return isset($this->csv_options); - } - - public function clearCsvOptions() - { - unset($this->csv_options); - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions $var - * @return $this - */ - public function setCsvOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions::class); - $this->csv_options = $var; - - return $this; - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions|null - */ - public function getJsonOptions() - { - return $this->json_options; - } - - public function hasJsonOptions() - { - return isset($this->json_options); - } - - public function clearJsonOptions() - { - unset($this->json_options); - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions $var - * @return $this - */ - public function setJsonOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions::class); - $this->json_options = $var; - - return $this; - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSchedule() - { - return $this->readOneof(10); - } - - public function hasSchedule() - { - return $this->hasOneof(10); - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * @return string - */ - public function getTrigger() - { - return $this->whichOneof("trigger"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiscoverySpec::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php deleted file mode 100644 index fe2a4ee14034..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - */ -class CsvOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header_rows = 0; - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $header_rows - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * @type string $delimiter - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHeaderRows($var) - { - GPBUtil::checkInt32($var); - $this->header_rows = $var; - - return $this; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec_CsvOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php deleted file mode 100644 index 8d990855a450..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - */ -class JsonOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec_JsonOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php deleted file mode 100644 index e36f7d5ebfb3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.Zone.ResourceSpec - */ -class ResourceSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $location_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $location_type - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getLocationType() - { - return $this->location_type; - } - - /** - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setLocationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Zone\ResourceSpec\LocationType::class); - $this->location_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceSpec::class, \Google\Cloud\Dataplex\V1\Zone_ResourceSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php deleted file mode 100644 index 4720281da7ba..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType - */ -class LocationType -{ - /** - * Unspecified location type. - * - * Generated from protobuf enum LOCATION_TYPE_UNSPECIFIED = 0; - */ - const LOCATION_TYPE_UNSPECIFIED = 0; - /** - * Resources that are associated with a single region. - * - * Generated from protobuf enum SINGLE_REGION = 1; - */ - const SINGLE_REGION = 1; - /** - * Resources that are associated with a multi-region location. - * - * Generated from protobuf enum MULTI_REGION = 2; - */ - const MULTI_REGION = 2; - - private static $valueToName = [ - self::LOCATION_TYPE_UNSPECIFIED => 'LOCATION_TYPE_UNSPECIFIED', - self::SINGLE_REGION => 'SINGLE_REGION', - self::MULTI_REGION => 'MULTI_REGION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LocationType::class, \Google\Cloud\Dataplex\V1\Zone_ResourceSpec_LocationType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php deleted file mode 100644 index dca85b04561e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dataplex.v1.Zone.Type - */ -class Type -{ - /** - * Zone type not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A zone that contains data that needs further processing before it is - * considered generally ready for consumption and analytics workloads. - * - * Generated from protobuf enum RAW = 1; - */ - const RAW = 1; - /** - * A zone that contains data that is considered to be ready for broader - * consumption and analytics workloads. Curated structured data stored in - * Cloud Storage must conform to certain file formats (parquet, avro and - * orc) and organized in a hive-compatible directory layout. - * - * Generated from protobuf enum CURATED = 2; - */ - const CURATED = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::RAW => 'RAW', - self::CURATED => 'CURATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Zone_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php deleted file mode 100644 index e93d2f09716a..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php +++ /dev/null @@ -1,85 +0,0 @@ -setPath($contentPath) - ->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - - // Call the API and handle any network failures. - try { - /** @var Content $response */ - $response = $contentServiceClient->createContent($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 = ContentServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $contentPath = '[PATH]'; - $contentDataText = '[DATA_TEXT]'; - - create_content_sample($formattedParent, $contentPath, $contentDataText); -} -// [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php deleted file mode 100644 index ff071e6f17dc..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $contentServiceClient->deleteContent($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 = ContentServiceClient::contentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[CONTENT]' - ); - - delete_content_sample($formattedName); -} -// [END dataplex_v1_generated_ContentService_DeleteContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php deleted file mode 100644 index 74f4a09b745a..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Content $response */ - $response = $contentServiceClient->getContent($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 = ContentServiceClient::contentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[CONTENT]' - ); - - get_content_sample($formattedName); -} -// [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php deleted file mode 100644 index ad7081cb0b1e..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $contentServiceClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_ContentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php deleted file mode 100644 index b348902ce6dd..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_ContentService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php deleted file mode 100644 index ed40430ad270..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $contentServiceClient->listContent($request); - - /** @var Content $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 = ContentServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_content_sample($formattedParent); -} -// [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php deleted file mode 100644 index 6c5bbc8a769e..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $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()); - } -} -// [END dataplex_v1_generated_ContentService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php deleted file mode 100644 index d8c92f530960..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $contentServiceClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_ContentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php deleted file mode 100644 index a276ac61efec..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,87 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $contentServiceClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php deleted file mode 100644 index 688c85bc6a90..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php +++ /dev/null @@ -1,80 +0,0 @@ -setPath($contentPath) - ->setDataText($contentDataText); - $request = (new UpdateContentRequest()) - ->setUpdateMask($updateMask) - ->setContent($content); - - // Call the API and handle any network failures. - try { - /** @var Content $response */ - $response = $contentServiceClient->updateContent($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 -{ - $contentPath = '[PATH]'; - $contentDataText = '[DATA_TEXT]'; - - update_content_sample($contentPath, $contentDataText); -} -// [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php deleted file mode 100644 index a6acf9599d4d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php +++ /dev/null @@ -1,100 +0,0 @@ -setData($dataScanData); - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataScanServiceClient->createDataScan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataScan $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 = DataScanServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataScanId = '[DATA_SCAN_ID]'; - - create_data_scan_sample($formattedParent, $dataScanId); -} -// [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php deleted file mode 100644 index b0e0dc9cadfc..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataScanServiceClient->deleteDataScan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - delete_data_scan_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php deleted file mode 100644 index cd47d8e1e770..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataScan $response */ - $response = $dataScanServiceClient->getDataScan($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 = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - get_data_scan_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php deleted file mode 100644 index 6560d161619f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataScanJob $response */ - $response = $dataScanServiceClient->getDataScanJob($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 = DataScanServiceClient::dataScanJobName( - '[PROJECT]', - '[LOCATION]', - '[DATASCAN]', - '[JOB]' - ); - - get_data_scan_job_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php deleted file mode 100644 index 741fdc59700e..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataScanServiceClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataScanService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php deleted file mode 100644 index b9d32e8172a1..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataScanService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php deleted file mode 100644 index b3594d654c11..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataScanServiceClient->listDataScanJobs($request); - - /** @var DataScanJob $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 = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - list_data_scan_jobs_sample($formattedParent); -} -// [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php deleted file mode 100644 index 039d010b8b3f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataScanServiceClient->listDataScans($request); - - /** @var DataScan $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 = DataScanServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_scans_sample($formattedParent); -} -// [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php deleted file mode 100644 index 9948c040a261..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $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()); - } -} -// [END dataplex_v1_generated_DataScanService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php deleted file mode 100644 index 4d8ee5506801..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RunDataScanResponse $response */ - $response = $dataScanServiceClient->runDataScan($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 = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - run_data_scan_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php deleted file mode 100644 index e2d2ecc99189..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataScanServiceClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataScanService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php deleted file mode 100644 index 59e98e72093d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $dataScanServiceClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_DataScanService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php deleted file mode 100644 index 1fb12c9b56ad..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php +++ /dev/null @@ -1,77 +0,0 @@ -setData($dataScanData); - $updateMask = new FieldMask(); - $request = (new UpdateDataScanRequest()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataScanServiceClient->updateDataScan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataScan $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()); - } -} -// [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php deleted file mode 100644 index 22d3016d4695..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->createDataAttribute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttribute $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 = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - $dataAttributeId = '[DATA_ATTRIBUTE_ID]'; - - create_data_attribute_sample($formattedParent, $dataAttributeId); -} -// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php deleted file mode 100644 index 98713b095a8a..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setDataAttributeBindingId($dataAttributeBindingId) - ->setDataAttributeBinding($dataAttributeBinding); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->createDataAttributeBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttributeBinding $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = '[DATA_ATTRIBUTE_BINDING_ID]'; - - create_data_attribute_binding_sample($formattedParent, $dataAttributeBindingId); -} -// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php deleted file mode 100644 index 5571016bc72b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setDataTaxonomyId($dataTaxonomyId) - ->setDataTaxonomy($dataTaxonomy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->createDataTaxonomy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataTaxonomy $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = '[DATA_TAXONOMY_ID]'; - - create_data_taxonomy_sample($formattedParent, $dataTaxonomyId); -} -// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php deleted file mode 100644 index 385684c2e2a8..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->deleteDataAttribute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataTaxonomyServiceClient::dataAttributeName( - '[PROJECT]', - '[LOCATION]', - '[DATATAXONOMY]', - '[DATA_ATTRIBUTE_ID]' - ); - - delete_data_attribute_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php deleted file mode 100644 index 4b9d0ef5a5ee..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->deleteDataAttributeBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataTaxonomyServiceClient::dataAttributeBindingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_ATTRIBUTE_BINDING_ID]' - ); - $etag = '[ETAG]'; - - delete_data_attribute_binding_sample($formattedName, $etag); -} -// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php deleted file mode 100644 index 1c291330b917..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->deleteDataTaxonomy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - - delete_data_taxonomy_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php deleted file mode 100644 index d9dfcec25749..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataAttribute $response */ - $response = $dataTaxonomyServiceClient->getDataAttribute($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 = DataTaxonomyServiceClient::dataAttributeName( - '[PROJECT]', - '[LOCATION]', - '[DATATAXONOMY]', - '[DATA_ATTRIBUTE_ID]' - ); - - get_data_attribute_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php deleted file mode 100644 index 14e6b9b5c31d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataAttributeBinding $response */ - $response = $dataTaxonomyServiceClient->getDataAttributeBinding($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 = DataTaxonomyServiceClient::dataAttributeBindingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_ATTRIBUTE_BINDING_ID]' - ); - - get_data_attribute_binding_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php deleted file mode 100644 index 77a88b35ed74..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataTaxonomy $response */ - $response = $dataTaxonomyServiceClient->getDataTaxonomy($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 = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - - get_data_taxonomy_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php deleted file mode 100644 index cdfe6b3c224d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataTaxonomyServiceClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php deleted file mode 100644 index 10ef26833a95..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php deleted file mode 100644 index 580015eea2a5..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTaxonomyServiceClient->listDataAttributeBindings($request); - - /** @var DataAttributeBinding $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_attribute_bindings_sample($formattedParent); -} -// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php deleted file mode 100644 index 45a3cf00c908..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTaxonomyServiceClient->listDataAttributes($request); - - /** @var DataAttribute $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 = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - - list_data_attributes_sample($formattedParent); -} -// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php deleted file mode 100644 index 15d2c9816c6f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTaxonomyServiceClient->listDataTaxonomies($request); - - /** @var DataTaxonomy $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 = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_taxonomies_sample($formattedParent); -} -// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php deleted file mode 100644 index 6513d03c7a0b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $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()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php deleted file mode 100644 index 824260ddc1a9..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataTaxonomyServiceClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataTaxonomyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php deleted file mode 100644 index c0e4ecf04483..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $dataTaxonomyServiceClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_DataTaxonomyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php deleted file mode 100644 index 285473890da3..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setDataAttribute($dataAttribute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->updateDataAttribute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttribute $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()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php deleted file mode 100644 index 445933633ce2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setDataAttributeBinding($dataAttributeBinding); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->updateDataAttributeBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttributeBinding $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()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php deleted file mode 100644 index 26f7f3751d02..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setDataTaxonomy($dataTaxonomy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->updateDataTaxonomy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataTaxonomy $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()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php deleted file mode 100644 index 0066b1261e4d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataplexServiceClient->cancelJob($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 = DataplexServiceClient::jobName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[TASK]', - '[JOB]' - ); - - cancel_job_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php deleted file mode 100644 index f057073fe270..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php +++ /dev/null @@ -1,106 +0,0 @@ -setType($assetResourceSpecType); - $asset = (new Asset()) - ->setResourceSpec($assetResourceSpec); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAssetId($assetId) - ->setAsset($asset); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Asset $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = '[ASSET_ID]'; - $assetResourceSpecType = Type::TYPE_UNSPECIFIED; - - create_asset_sample($formattedParent, $assetId, $assetResourceSpecType); -} -// [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php deleted file mode 100644 index 6b8d80141514..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php +++ /dev/null @@ -1,110 +0,0 @@ -setImageVersion($environmentInfrastructureSpecOsImageImageVersion); - $environmentInfrastructureSpec = (new InfrastructureSpec()) - ->setOsImage($environmentInfrastructureSpecOsImage); - $environment = (new Environment()) - ->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = '[ENVIRONMENT_ID]'; - $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]'; - - create_environment_sample( - $formattedParent, - $environmentId, - $environmentInfrastructureSpecOsImageImageVersion - ); -} -// [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php deleted file mode 100644 index 73d0e04a03d4..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php +++ /dev/null @@ -1,97 +0,0 @@ -setParent($formattedParent) - ->setLakeId($lakeId) - ->setLake($lake); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createLake($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Lake $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 = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $lakeId = '[LAKE_ID]'; - - create_lake_sample($formattedParent, $lakeId); -} -// [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php deleted file mode 100644 index d38ea0c2a6f2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php +++ /dev/null @@ -1,113 +0,0 @@ -setType($taskTriggerSpecType); - $taskExecutionSpec = (new ExecutionSpec()) - ->setServiceAccount($taskExecutionSpecServiceAccount); - $task = (new Task()) - ->setTriggerSpec($taskTriggerSpec) - ->setExecutionSpec($taskExecutionSpec); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTaskId($taskId) - ->setTask($task); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createTask($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Task $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = '[TASK_ID]'; - $taskTriggerSpecType = Type::TYPE_UNSPECIFIED; - $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]'; - - create_task_sample( - $formattedParent, - $taskId, - $taskTriggerSpecType, - $taskExecutionSpecServiceAccount - ); -} -// [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php deleted file mode 100644 index 392d9413e5b3..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php +++ /dev/null @@ -1,113 +0,0 @@ -setLocationType($zoneResourceSpecLocationType); - $zone = (new Zone()) - ->setType($zoneType) - ->setResourceSpec($zoneResourceSpec); - $request = (new CreateZoneRequest()) - ->setParent($formattedParent) - ->setZoneId($zoneId) - ->setZone($zone); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createZone($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Zone $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = '[ZONE_ID]'; - $zoneType = Type::TYPE_UNSPECIFIED; - $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - - create_zone_sample($formattedParent, $zoneId, $zoneType, $zoneResourceSpecLocationType); -} -// [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php deleted file mode 100644 index 798d1d0645fd..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataplexServiceClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ASSET]' - ); - - delete_asset_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php deleted file mode 100644 index 4587bd2482b2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataplexServiceClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ENVIRONMENT]' - ); - - delete_environment_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php deleted file mode 100644 index 10b8301b577a..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteLake($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - delete_lake_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php deleted file mode 100644 index 1310dbd6d5a6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteTask($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - delete_task_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php deleted file mode 100644 index 76e19d03180d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteZone($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } 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 -{ - $formattedName = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - delete_zone_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php deleted file mode 100644 index ff74e5d5edcb..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $dataplexServiceClient->getAsset($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 = DataplexServiceClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ASSET]' - ); - - get_asset_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php deleted file mode 100644 index 3f1cc1f7fabd..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Environment $response */ - $response = $dataplexServiceClient->getEnvironment($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 = DataplexServiceClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ENVIRONMENT]' - ); - - get_environment_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php deleted file mode 100644 index ca00c0967d38..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataplexServiceClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataplexService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php deleted file mode 100644 index ae0010840b32..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $dataplexServiceClient->getJob($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 = DataplexServiceClient::jobName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[TASK]', - '[JOB]' - ); - - get_job_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php deleted file mode 100644 index bcde3b88f117..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Lake $response */ - $response = $dataplexServiceClient->getLake($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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - get_lake_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php deleted file mode 100644 index 129ba1447a2c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataplexService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php deleted file mode 100644 index 300fb95f3e9c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $dataplexServiceClient->getTask($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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - get_task_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php deleted file mode 100644 index 83b5453bf71e..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Zone $response */ - $response = $dataplexServiceClient->getZone($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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - get_zone_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php deleted file mode 100644 index e48f14f7a532..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listAssetActions($request); - - /** @var Action $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 = DataplexServiceClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ASSET]' - ); - - list_asset_actions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php deleted file mode 100644 index b483f11e2fb6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listAssets($request); - - /** @var Asset $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - list_assets_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php deleted file mode 100644 index 85a3b128760d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listEnvironments($request); - - /** @var Environment $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_environments_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php deleted file mode 100644 index 7cffcf6c585d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listJobs($request); - - /** @var Job $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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - list_jobs_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php deleted file mode 100644 index b72093e263f2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listLakeActions($request); - - /** @var Action $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_lake_actions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php deleted file mode 100644 index 0771b5d36457..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listLakes($request); - - /** @var Lake $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 = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_lakes_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php deleted file mode 100644 index 7fc1851579f8..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $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()); - } -} -// [END dataplex_v1_generated_DataplexService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php deleted file mode 100644 index 351ba996fd63..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listSessions($request); - - /** @var Session $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 = DataplexServiceClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ENVIRONMENT]' - ); - - list_sessions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php deleted file mode 100644 index b6844fe5655e..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listTasks($request); - - /** @var Task $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_tasks_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php deleted file mode 100644 index c477200a396c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listZoneActions($request); - - /** @var Action $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 = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - list_zone_actions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php deleted file mode 100644 index 677468431263..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listZones($request); - - /** @var Zone $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 = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_zones_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php deleted file mode 100644 index e2820ce822d9..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RunTaskResponse $response */ - $response = $dataplexServiceClient->runTask($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 = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - run_task_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php deleted file mode 100644 index bc545bab9e0c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataplexServiceClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataplexService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php deleted file mode 100644 index 1ab6ba3dbaea..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $dataplexServiceClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_DataplexService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php deleted file mode 100644 index c77d574602e1..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php +++ /dev/null @@ -1,91 +0,0 @@ -setType($assetResourceSpecType); - $asset = (new Asset()) - ->setResourceSpec($assetResourceSpec); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Asset $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 -{ - $assetResourceSpecType = Type::TYPE_UNSPECIFIED; - - update_asset_sample($assetResourceSpecType); -} -// [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php deleted file mode 100644 index bed9c28b72f6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php +++ /dev/null @@ -1,93 +0,0 @@ -setImageVersion($environmentInfrastructureSpecOsImageImageVersion); - $environmentInfrastructureSpec = (new InfrastructureSpec()) - ->setOsImage($environmentInfrastructureSpecOsImage); - $environment = (new Environment()) - ->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new UpdateEnvironmentRequest()) - ->setUpdateMask($updateMask) - ->setEnvironment($environment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $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 -{ - $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]'; - - update_environment_sample($environmentInfrastructureSpecOsImageImageVersion); -} -// [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php deleted file mode 100644 index dc022969b8a0..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setLake($lake); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateLake($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Lake $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()); - } -} -// [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php deleted file mode 100644 index 93259225b932..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php +++ /dev/null @@ -1,101 +0,0 @@ -setType($taskTriggerSpecType); - $taskExecutionSpec = (new ExecutionSpec()) - ->setServiceAccount($taskExecutionSpecServiceAccount); - $task = (new Task()) - ->setTriggerSpec($taskTriggerSpec) - ->setExecutionSpec($taskExecutionSpec); - $request = (new UpdateTaskRequest()) - ->setUpdateMask($updateMask) - ->setTask($task); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateTask($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Task $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 -{ - $taskTriggerSpecType = Type::TYPE_UNSPECIFIED; - $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]'; - - update_task_sample($taskTriggerSpecType, $taskExecutionSpecServiceAccount); -} -// [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php deleted file mode 100644 index 52fbcc9b5490..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php +++ /dev/null @@ -1,96 +0,0 @@ -setLocationType($zoneResourceSpecLocationType); - $zone = (new Zone()) - ->setType($zoneType) - ->setResourceSpec($zoneResourceSpec); - $request = (new UpdateZoneRequest()) - ->setUpdateMask($updateMask) - ->setZone($zone); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateZone($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Zone $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 -{ - $zoneType = Type::TYPE_UNSPECIFIED; - $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - - update_zone_sample($zoneType, $zoneResourceSpecLocationType); -} -// [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php deleted file mode 100644 index 05c238731f50..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * @param bool $entitySchemaUserManaged Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - */ -function create_entity_sample( - string $formattedParent, - string $entityId, - int $entityType, - string $entityAsset, - string $entityDataPath, - int $entitySystem, - string $entityFormatMimeType, - bool $entitySchemaUserManaged -): void { - // Create a client. - $metadataServiceClient = new MetadataServiceClient(); - - // Prepare the request message. - $entityFormat = (new StorageFormat()) - ->setMimeType($entityFormatMimeType); - $entitySchema = (new Schema()) - ->setUserManaged($entitySchemaUserManaged); - $entity = (new Entity()) - ->setId($entityId) - ->setType($entityType) - ->setAsset($entityAsset) - ->setDataPath($entityDataPath) - ->setSystem($entitySystem) - ->setFormat($entityFormat) - ->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - - // Call the API and handle any network failures. - try { - /** @var Entity $response */ - $response = $metadataServiceClient->createEntity($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 = MetadataServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entityId = '[ID]'; - $entityType = Type::TYPE_UNSPECIFIED; - $entityAsset = '[ASSET]'; - $entityDataPath = '[DATA_PATH]'; - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entityFormatMimeType = '[MIME_TYPE]'; - $entitySchemaUserManaged = false; - - create_entity_sample( - $formattedParent, - $entityId, - $entityType, - $entityAsset, - $entityDataPath, - $entitySystem, - $entityFormatMimeType, - $entitySchemaUserManaged - ); -} -// [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php deleted file mode 100644 index 026659fb503b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php +++ /dev/null @@ -1,93 +0,0 @@ -/datasets//tables/` - */ -function create_partition_sample( - string $formattedParent, - string $partitionValuesElement, - string $partitionLocation -): void { - // Create a client. - $metadataServiceClient = new MetadataServiceClient(); - - // Prepare the request message. - $partitionValues = [$partitionValuesElement,]; - $partition = (new Partition()) - ->setValues($partitionValues) - ->setLocation($partitionLocation); - $request = (new CreatePartitionRequest()) - ->setParent($formattedParent) - ->setPartition($partition); - - // Call the API and handle any network failures. - try { - /** @var Partition $response */ - $response = $metadataServiceClient->createPartition($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 = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - $partitionValuesElement = '[VALUES]'; - $partitionLocation = '[LOCATION]'; - - create_partition_sample($formattedParent, $partitionValuesElement, $partitionLocation); -} -// [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php deleted file mode 100644 index 00e051a78951..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - $metadataServiceClient->deleteEntity($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 = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - $etag = '[ETAG]'; - - delete_entity_sample($formattedName, $etag); -} -// [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php deleted file mode 100644 index 31e4f2eda9b4..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $metadataServiceClient->deletePartition($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 = MetadataServiceClient::partitionName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]', - '[PARTITION]' - ); - - delete_partition_sample($formattedName); -} -// [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php deleted file mode 100644 index ec79b20d7df2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Entity $response */ - $response = $metadataServiceClient->getEntity($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 = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - - get_entity_sample($formattedName); -} -// [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php deleted file mode 100644 index 8399224b6907..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $metadataServiceClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_MetadataService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php deleted file mode 100644 index 5501bc69439f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_MetadataService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php deleted file mode 100644 index ce12b9d3fca7..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Partition $response */ - $response = $metadataServiceClient->getPartition($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 = MetadataServiceClient::partitionName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]', - '[PARTITION]' - ); - - get_partition_sample($formattedName); -} -// [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php deleted file mode 100644 index 99dd49524367..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metadataServiceClient->listEntities($request); - - /** @var Entity $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 = MetadataServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - - list_entities_sample($formattedParent, $view); -} -// [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php deleted file mode 100644 index f202cd99b0ba..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $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()); - } -} -// [END dataplex_v1_generated_MetadataService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php deleted file mode 100644 index 9f9be687c200..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metadataServiceClient->listPartitions($request); - - /** @var Partition $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 = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - - list_partitions_sample($formattedParent); -} -// [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php deleted file mode 100644 index 5b3901d62fdc..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $metadataServiceClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_MetadataService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php deleted file mode 100644 index ec38b927465d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $metadataServiceClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_MetadataService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php deleted file mode 100644 index b0def36590ed..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * @param bool $entitySchemaUserManaged Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - */ -function update_entity_sample( - string $entityId, - int $entityType, - string $entityAsset, - string $entityDataPath, - int $entitySystem, - string $entityFormatMimeType, - bool $entitySchemaUserManaged -): void { - // Create a client. - $metadataServiceClient = new MetadataServiceClient(); - - // Prepare the request message. - $entityFormat = (new StorageFormat()) - ->setMimeType($entityFormatMimeType); - $entitySchema = (new Schema()) - ->setUserManaged($entitySchemaUserManaged); - $entity = (new Entity()) - ->setId($entityId) - ->setType($entityType) - ->setAsset($entityAsset) - ->setDataPath($entityDataPath) - ->setSystem($entitySystem) - ->setFormat($entityFormat) - ->setSchema($entitySchema); - $request = (new UpdateEntityRequest()) - ->setEntity($entity); - - // Call the API and handle any network failures. - try { - /** @var Entity $response */ - $response = $metadataServiceClient->updateEntity($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 -{ - $entityId = '[ID]'; - $entityType = Type::TYPE_UNSPECIFIED; - $entityAsset = '[ASSET]'; - $entityDataPath = '[DATA_PATH]'; - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entityFormatMimeType = '[MIME_TYPE]'; - $entitySchemaUserManaged = false; - - update_entity_sample( - $entityId, - $entityType, - $entityAsset, - $entityDataPath, - $entitySystem, - $entityFormatMimeType, - $entitySchemaUserManaged - ); -} -// [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php deleted file mode 100644 index 79febaef815a..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php +++ /dev/null @@ -1,531 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/content_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/content_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/content_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/content_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a content - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $content - * - * @return string The formatted content resource. - */ - public static function contentName(string $project, string $location, string $lake, string $content): string - { - return self::getPathTemplate('content')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'content' => $content, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName(string $project, string $location, string $lake): string - { - return self::getPathTemplate('lake')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - content: projects/{project}/locations/{location}/lakes/{lake}/content/{content} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create a content. - * - * The async variant is {@see ContentServiceClient::createContentAsync()} . - * - * @example samples/V1/ContentServiceClient/create_content.php - * - * @param CreateContentRequest $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 Content - * - * @throws ApiException Thrown if the API call fails. - */ - public function createContent(CreateContentRequest $request, array $callOptions = []): Content - { - return $this->startApiCall('CreateContent', $request, $callOptions)->wait(); - } - - /** - * Delete a content. - * - * The async variant is {@see ContentServiceClient::deleteContentAsync()} . - * - * @example samples/V1/ContentServiceClient/delete_content.php - * - * @param DeleteContentRequest $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 deleteContent(DeleteContentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteContent', $request, $callOptions)->wait(); - } - - /** - * Get a content resource. - * - * The async variant is {@see ContentServiceClient::getContentAsync()} . - * - * @example samples/V1/ContentServiceClient/get_content.php - * - * @param GetContentRequest $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 Content - * - * @throws ApiException Thrown if the API call fails. - */ - public function getContent(GetContentRequest $request, array $callOptions = []): Content - { - return $this->startApiCall('GetContent', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a contentitem resource. A `NOT_FOUND` - * error is returned if the resource does not exist. An empty policy is - * returned if the resource exists but does not have a policy set on it. - * - * Caller must have Google IAM `dataplex.content.getIamPolicy` permission - * on the resource. - * - * The async variant is {@see ContentServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ContentServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * List content. - * - * The async variant is {@see ContentServiceClient::listContentAsync()} . - * - * @example samples/V1/ContentServiceClient/list_content.php - * - * @param ListContentRequest $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 listContent(ListContentRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListContent', $request, $callOptions); - } - - /** - * Sets the access control policy on the specified contentitem resource. - * Replaces any existing policy. - * - * Caller must have Google IAM `dataplex.content.setIamPolicy` permission - * on the resource. - * - * The async variant is {@see ContentServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ContentServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns the caller's permissions on a resource. - * If the resource does not exist, an empty set of - * permissions is returned (a `NOT_FOUND` error is not returned). - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * The async variant is {@see ContentServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ContentServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Update a content. Only supports full resource update. - * - * The async variant is {@see ContentServiceClient::updateContentAsync()} . - * - * @example samples/V1/ContentServiceClient/update_content.php - * - * @param UpdateContentRequest $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 Content - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateContent(UpdateContentRequest $request, array $callOptions = []): Content - { - return $this->startApiCall('UpdateContent', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ContentServiceClient::getLocationAsync()} . - * - * @example samples/V1/ContentServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ContentServiceClient::listLocationsAsync()} . - * - * @example samples/V1/ContentServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php deleted file mode 100644 index bb4f769a7dd8..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php +++ /dev/null @@ -1,691 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_scan_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_scan_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_scan_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_scan_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_scan - * resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * - * @return string The formatted data_scan resource. - */ - public static function dataScanName(string $project, string $location, string $dataScan): string - { - return self::getPathTemplate('dataScan')->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_scan_job resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * @param string $job - * - * @return string The formatted data_scan_job resource. - */ - public static function dataScanJobName(string $project, string $location, string $dataScan, string $job): string - { - return self::getPathTemplate('dataScanJob')->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName(string $project, string $location, string $lake, string $zone, string $entity): string - { - return self::getPathTemplate('entity')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataScan: projects/{project}/locations/{location}/dataScans/{dataScan} - * - dataScanJob: projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job} - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::createDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/create_data_scan.php - * - * @param CreateDataScanRequest $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 createDataScan(CreateDataScanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataScan', $request, $callOptions)->wait(); - } - - /** - * Deletes a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::deleteDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/delete_data_scan.php - * - * @param DeleteDataScanRequest $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 deleteDataScan(DeleteDataScanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataScan', $request, $callOptions)->wait(); - } - - /** - * Gets a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::getDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_data_scan.php - * - * @param GetDataScanRequest $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 DataScan - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataScan(GetDataScanRequest $request, array $callOptions = []): DataScan - { - return $this->startApiCall('GetDataScan', $request, $callOptions)->wait(); - } - - /** - * Gets a DataScanJob resource. - * - * The async variant is {@see DataScanServiceClient::getDataScanJobAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_data_scan_job.php - * - * @param GetDataScanJobRequest $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 DataScanJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataScanJob(GetDataScanJobRequest $request, array $callOptions = []): DataScanJob - { - return $this->startApiCall('GetDataScanJob', $request, $callOptions)->wait(); - } - - /** - * Lists DataScanJobs under the given DataScan. - * - * The async variant is {@see DataScanServiceClient::listDataScanJobsAsync()} . - * - * @example samples/V1/DataScanServiceClient/list_data_scan_jobs.php - * - * @param ListDataScanJobsRequest $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 listDataScanJobs(ListDataScanJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataScanJobs', $request, $callOptions); - } - - /** - * Lists DataScans. - * - * The async variant is {@see DataScanServiceClient::listDataScansAsync()} . - * - * @example samples/V1/DataScanServiceClient/list_data_scans.php - * - * @param ListDataScansRequest $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 listDataScans(ListDataScansRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataScans', $request, $callOptions); - } - - /** - * Runs an on-demand execution of a DataScan - * - * The async variant is {@see DataScanServiceClient::runDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/run_data_scan.php - * - * @param RunDataScanRequest $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 RunDataScanResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runDataScan(RunDataScanRequest $request, array $callOptions = []): RunDataScanResponse - { - return $this->startApiCall('RunDataScan', $request, $callOptions)->wait(); - } - - /** - * Updates a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::updateDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/update_data_scan.php - * - * @param UpdateDataScanRequest $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 updateDataScan(UpdateDataScanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataScan', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see DataScanServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see DataScanServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DataScanServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see DataScanServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/DataScanServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataScanServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DataScanServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataScanServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php deleted file mode 100644 index b33e44f5c5fe..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php +++ /dev/null @@ -1,900 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_taxonomy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_taxonomy_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomy - * @param string $dataAttributeId - * - * @return string The formatted data_attribute resource. - */ - public static function dataAttributeName(string $project, string $location, string $dataTaxonomy, string $dataAttributeId): string - { - return self::getPathTemplate('dataAttribute')->render([ - 'project' => $project, - 'location' => $location, - 'dataTaxonomy' => $dataTaxonomy, - 'data_attribute_id' => $dataAttributeId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute_binding resource. - * - * @param string $project - * @param string $location - * @param string $dataAttributeBindingId - * - * @return string The formatted data_attribute_binding resource. - */ - public static function dataAttributeBindingName(string $project, string $location, string $dataAttributeBindingId): string - { - return self::getPathTemplate('dataAttributeBinding')->render([ - 'project' => $project, - 'location' => $location, - 'data_attribute_binding_id' => $dataAttributeBindingId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_taxonomy resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomyId - * - * @return string The formatted data_taxonomy resource. - */ - public static function dataTaxonomyName(string $project, string $location, string $dataTaxonomyId): string - { - return self::getPathTemplate('dataTaxonomy')->render([ - 'project' => $project, - 'location' => $location, - 'data_taxonomy_id' => $dataTaxonomyId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataAttribute: projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - dataAttributeBinding: projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - dataTaxonomy: projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create a DataAttribute resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::createDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/create_data_attribute.php - * - * @param CreateDataAttributeRequest $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 createDataAttribute(CreateDataAttributeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Create a DataAttributeBinding resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::createDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php - * - * @param CreateDataAttributeBindingRequest $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 createDataAttributeBinding(CreateDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Create a DataTaxonomy resource. - * - * The async variant is {@see DataTaxonomyServiceClient::createDataTaxonomyAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php - * - * @param CreateDataTaxonomyRequest $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 createDataTaxonomy(CreateDataTaxonomyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Deletes a Data Attribute resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::deleteDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php - * - * @param DeleteDataAttributeRequest $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 deleteDataAttribute(DeleteDataAttributeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Deletes a DataAttributeBinding resource. All attributes within the - * DataAttributeBinding must be deleted before the DataAttributeBinding can be - * deleted. - * - * The async variant is - * {@see DataTaxonomyServiceClient::deleteDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php - * - * @param DeleteDataAttributeBindingRequest $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 deleteDataAttributeBinding(DeleteDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - * must be deleted before the DataTaxonomy can be deleted. - * - * The async variant is {@see DataTaxonomyServiceClient::deleteDataTaxonomyAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php - * - * @param DeleteDataTaxonomyRequest $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 deleteDataTaxonomy(DeleteDataTaxonomyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Retrieves a Data Attribute resource. - * - * The async variant is {@see DataTaxonomyServiceClient::getDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_data_attribute.php - * - * @param GetDataAttributeRequest $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 DataAttribute - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataAttribute(GetDataAttributeRequest $request, array $callOptions = []): DataAttribute - { - return $this->startApiCall('GetDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Retrieves a DataAttributeBinding resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::getDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php - * - * @param GetDataAttributeBindingRequest $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 DataAttributeBinding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataAttributeBinding(GetDataAttributeBindingRequest $request, array $callOptions = []): DataAttributeBinding - { - return $this->startApiCall('GetDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Retrieves a DataTaxonomy resource. - * - * The async variant is {@see DataTaxonomyServiceClient::getDataTaxonomyAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php - * - * @param GetDataTaxonomyRequest $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 DataTaxonomy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataTaxonomy(GetDataTaxonomyRequest $request, array $callOptions = []): DataTaxonomy - { - return $this->startApiCall('GetDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Lists DataAttributeBinding resources in a project and location. - * - * The async variant is - * {@see DataTaxonomyServiceClient::listDataAttributeBindingsAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php - * - * @param ListDataAttributeBindingsRequest $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 listDataAttributeBindings(ListDataAttributeBindingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataAttributeBindings', $request, $callOptions); - } - - /** - * Lists Data Attribute resources in a DataTaxonomy. - * - * The async variant is {@see DataTaxonomyServiceClient::listDataAttributesAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/list_data_attributes.php - * - * @param ListDataAttributesRequest $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 listDataAttributes(ListDataAttributesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataAttributes', $request, $callOptions); - } - - /** - * Lists DataTaxonomy resources in a project and location. - * - * The async variant is {@see DataTaxonomyServiceClient::listDataTaxonomiesAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php - * - * @param ListDataTaxonomiesRequest $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 listDataTaxonomies(ListDataTaxonomiesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataTaxonomies', $request, $callOptions); - } - - /** - * Updates a DataAttribute resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::updateDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/update_data_attribute.php - * - * @param UpdateDataAttributeRequest $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 updateDataAttribute(UpdateDataAttributeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Updates a DataAttributeBinding resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::updateDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php - * - * @param UpdateDataAttributeBindingRequest $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 updateDataAttributeBinding(UpdateDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Updates a DataTaxonomy resource. - * - * The async variant is {@see DataTaxonomyServiceClient::updateDataTaxonomyAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php - * - * @param UpdateDataTaxonomyRequest $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 updateDataTaxonomy(UpdateDataTaxonomyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see DataTaxonomyServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see DataTaxonomyServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see DataTaxonomyServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataTaxonomyServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DataTaxonomyServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php deleted file mode 100644 index 6ec4d7337b9c..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php +++ /dev/null @@ -1,1467 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/dataplex_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/dataplex_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/dataplex_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/dataplex_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a asset - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $asset - * - * @return string The formatted asset resource. - */ - public static function assetName(string $project, string $location, string $lake, string $zone, string $asset): string - { - return self::getPathTemplate('asset')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $lake, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $location, string $lake, string $task, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName(string $project, string $location, string $lake): string - { - return self::getPathTemplate('lake')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName(string $project, string $location, string $lake, string $task): string - { - return self::getPathTemplate('task')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName(string $project, string $location, string $lake, string $zone): string - { - return self::getPathTemplate('zone')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - asset: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset} - * - environment: projects/{project}/locations/{location}/lakes/{lake}/environments/{environment} - * - job: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - location: projects/{project}/locations/{location} - * - task: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Cancel jobs running for the task resource. - * - * The async variant is {@see DataplexServiceClient::cancelJobAsync()} . - * - * @example samples/V1/DataplexServiceClient/cancel_job.php - * - * @param CancelJobRequest $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 cancelJob(CancelJobRequest $request, array $callOptions = []): void - { - $this->startApiCall('CancelJob', $request, $callOptions)->wait(); - } - - /** - * Creates an asset resource. - * - * The async variant is {@see DataplexServiceClient::createAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_asset.php - * - * @param CreateAssetRequest $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 createAsset(CreateAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAsset', $request, $callOptions)->wait(); - } - - /** - * Create an environment resource. - * - * The async variant is {@see DataplexServiceClient::createEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_environment.php - * - * @param CreateEnvironmentRequest $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 createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Creates a lake resource. - * - * The async variant is {@see DataplexServiceClient::createLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_lake.php - * - * @param CreateLakeRequest $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 createLake(CreateLakeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLake', $request, $callOptions)->wait(); - } - - /** - * Creates a task resource within a lake. - * - * The async variant is {@see DataplexServiceClient::createTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_task.php - * - * @param CreateTaskRequest $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 createTask(CreateTaskRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTask', $request, $callOptions)->wait(); - } - - /** - * Creates a zone resource within a lake. - * - * The async variant is {@see DataplexServiceClient::createZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_zone.php - * - * @param CreateZoneRequest $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 createZone(CreateZoneRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateZone', $request, $callOptions)->wait(); - } - - /** - * Deletes an asset resource. The referenced storage resource is detached - * (default) or deleted based on the associated Lifecycle policy. - * - * The async variant is {@see DataplexServiceClient::deleteAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_asset.php - * - * @param DeleteAssetRequest $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 deleteAsset(DeleteAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAsset', $request, $callOptions)->wait(); - } - - /** - * Delete the environment resource. All the child resources must have been - * deleted before environment deletion can be initiated. - * - * The async variant is {@see DataplexServiceClient::deleteEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_environment.php - * - * @param DeleteEnvironmentRequest $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 deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); - } - - /** - * Deletes a lake resource. All zones within the lake must be deleted before - * the lake can be deleted. - * - * The async variant is {@see DataplexServiceClient::deleteLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_lake.php - * - * @param DeleteLakeRequest $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 deleteLake(DeleteLakeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLake', $request, $callOptions)->wait(); - } - - /** - * Delete the task resource. - * - * The async variant is {@see DataplexServiceClient::deleteTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_task.php - * - * @param DeleteTaskRequest $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 deleteTask(DeleteTaskRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTask', $request, $callOptions)->wait(); - } - - /** - * Deletes a zone resource. All assets within a zone must be deleted before - * the zone can be deleted. - * - * The async variant is {@see DataplexServiceClient::deleteZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_zone.php - * - * @param DeleteZoneRequest $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 deleteZone(DeleteZoneRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteZone', $request, $callOptions)->wait(); - } - - /** - * Retrieves an asset resource. - * - * The async variant is {@see DataplexServiceClient::getAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_asset.php - * - * @param GetAssetRequest $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 Asset - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAsset(GetAssetRequest $request, array $callOptions = []): Asset - { - return $this->startApiCall('GetAsset', $request, $callOptions)->wait(); - } - - /** - * Get environment resource. - * - * The async variant is {@see DataplexServiceClient::getEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_environment.php - * - * @param GetEnvironmentRequest $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 Environment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment - { - return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); - } - - /** - * Get job resource. - * - * The async variant is {@see DataplexServiceClient::getJobAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_job.php - * - * @param GetJobRequest $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 Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJob(GetJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('GetJob', $request, $callOptions)->wait(); - } - - /** - * Retrieves a lake resource. - * - * The async variant is {@see DataplexServiceClient::getLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_lake.php - * - * @param GetLakeRequest $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 Lake - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLake(GetLakeRequest $request, array $callOptions = []): Lake - { - return $this->startApiCall('GetLake', $request, $callOptions)->wait(); - } - - /** - * Get task resource. - * - * The async variant is {@see DataplexServiceClient::getTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_task.php - * - * @param GetTaskRequest $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 Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTask(GetTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('GetTask', $request, $callOptions)->wait(); - } - - /** - * Retrieves a zone resource. - * - * The async variant is {@see DataplexServiceClient::getZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_zone.php - * - * @param GetZoneRequest $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 Zone - * - * @throws ApiException Thrown if the API call fails. - */ - public function getZone(GetZoneRequest $request, array $callOptions = []): Zone - { - return $this->startApiCall('GetZone', $request, $callOptions)->wait(); - } - - /** - * Lists action resources in an asset. - * - * The async variant is {@see DataplexServiceClient::listAssetActionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_asset_actions.php - * - * @param ListAssetActionsRequest $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 listAssetActions(ListAssetActionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAssetActions', $request, $callOptions); - } - - /** - * Lists asset resources in a zone. - * - * The async variant is {@see DataplexServiceClient::listAssetsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_assets.php - * - * @param ListAssetsRequest $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 listAssets(ListAssetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAssets', $request, $callOptions); - } - - /** - * Lists environments under the given lake. - * - * The async variant is {@see DataplexServiceClient::listEnvironmentsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_environments.php - * - * @param ListEnvironmentsRequest $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 listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEnvironments', $request, $callOptions); - } - - /** - * Lists Jobs under the given task. - * - * The async variant is {@see DataplexServiceClient::listJobsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_jobs.php - * - * @param ListJobsRequest $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 listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobs', $request, $callOptions); - } - - /** - * Lists action resources in a lake. - * - * The async variant is {@see DataplexServiceClient::listLakeActionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_lake_actions.php - * - * @param ListLakeActionsRequest $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 listLakeActions(ListLakeActionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLakeActions', $request, $callOptions); - } - - /** - * Lists lake resources in a project and location. - * - * The async variant is {@see DataplexServiceClient::listLakesAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_lakes.php - * - * @param ListLakesRequest $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 listLakes(ListLakesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLakes', $request, $callOptions); - } - - /** - * Lists session resources in an environment. - * - * The async variant is {@see DataplexServiceClient::listSessionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_sessions.php - * - * @param ListSessionsRequest $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 listSessions(ListSessionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSessions', $request, $callOptions); - } - - /** - * Lists tasks under the given lake. - * - * The async variant is {@see DataplexServiceClient::listTasksAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_tasks.php - * - * @param ListTasksRequest $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 listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTasks', $request, $callOptions); - } - - /** - * Lists action resources in a zone. - * - * The async variant is {@see DataplexServiceClient::listZoneActionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_zone_actions.php - * - * @param ListZoneActionsRequest $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 listZoneActions(ListZoneActionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListZoneActions', $request, $callOptions); - } - - /** - * Lists zone resources in a lake. - * - * The async variant is {@see DataplexServiceClient::listZonesAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_zones.php - * - * @param ListZonesRequest $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 listZones(ListZonesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListZones', $request, $callOptions); - } - - /** - * Run an on demand execution of a Task. - * - * The async variant is {@see DataplexServiceClient::runTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/run_task.php - * - * @param RunTaskRequest $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 RunTaskResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runTask(RunTaskRequest $request, array $callOptions = []): RunTaskResponse - { - return $this->startApiCall('RunTask', $request, $callOptions)->wait(); - } - - /** - * Updates an asset resource. - * - * The async variant is {@see DataplexServiceClient::updateAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_asset.php - * - * @param UpdateAssetRequest $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 updateAsset(UpdateAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAsset', $request, $callOptions)->wait(); - } - - /** - * Update the environment resource. - * - * The async variant is {@see DataplexServiceClient::updateEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_environment.php - * - * @param UpdateEnvironmentRequest $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 updateEnvironment(UpdateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Updates a lake resource. - * - * The async variant is {@see DataplexServiceClient::updateLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_lake.php - * - * @param UpdateLakeRequest $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 updateLake(UpdateLakeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateLake', $request, $callOptions)->wait(); - } - - /** - * Update the task resource. - * - * The async variant is {@see DataplexServiceClient::updateTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_task.php - * - * @param UpdateTaskRequest $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 updateTask(UpdateTaskRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTask', $request, $callOptions)->wait(); - } - - /** - * Updates a zone resource. - * - * The async variant is {@see DataplexServiceClient::updateZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_zone.php - * - * @param UpdateZoneRequest $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 updateZone(UpdateZoneRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateZone', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see DataplexServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see DataplexServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DataplexServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see DataplexServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataplexServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DataplexServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php deleted file mode 100644 index f3c0d5cf22fa..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php +++ /dev/null @@ -1,666 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metadata_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metadata_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metadata_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metadata_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName(string $project, string $location, string $lake, string $zone, string $entity): string - { - return self::getPathTemplate('entity')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a partition - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * @param string $partition - * - * @return string The formatted partition resource. - */ - public static function partitionName(string $project, string $location, string $lake, string $zone, string $entity, string $partition): string - { - return self::getPathTemplate('partition')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - 'partition' => $partition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName(string $project, string $location, string $lake, string $zone): string - { - return self::getPathTemplate('zone')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - partition: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create a metadata entity. - * - * The async variant is {@see MetadataServiceClient::createEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/create_entity.php - * - * @param CreateEntityRequest $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 Entity - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntity(CreateEntityRequest $request, array $callOptions = []): Entity - { - return $this->startApiCall('CreateEntity', $request, $callOptions)->wait(); - } - - /** - * Create a metadata partition. - * - * The async variant is {@see MetadataServiceClient::createPartitionAsync()} . - * - * @example samples/V1/MetadataServiceClient/create_partition.php - * - * @param CreatePartitionRequest $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 Partition - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPartition(CreatePartitionRequest $request, array $callOptions = []): Partition - { - return $this->startApiCall('CreatePartition', $request, $callOptions)->wait(); - } - - /** - * Delete a metadata entity. - * - * The async variant is {@see MetadataServiceClient::deleteEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/delete_entity.php - * - * @param DeleteEntityRequest $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 deleteEntity(DeleteEntityRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEntity', $request, $callOptions)->wait(); - } - - /** - * Delete a metadata partition. - * - * The async variant is {@see MetadataServiceClient::deletePartitionAsync()} . - * - * @example samples/V1/MetadataServiceClient/delete_partition.php - * - * @param DeletePartitionRequest $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 deletePartition(DeletePartitionRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePartition', $request, $callOptions)->wait(); - } - - /** - * Get a metadata entity. - * - * The async variant is {@see MetadataServiceClient::getEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_entity.php - * - * @param GetEntityRequest $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 Entity - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntity(GetEntityRequest $request, array $callOptions = []): Entity - { - return $this->startApiCall('GetEntity', $request, $callOptions)->wait(); - } - - /** - * Get a metadata partition of an entity. - * - * The async variant is {@see MetadataServiceClient::getPartitionAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_partition.php - * - * @param GetPartitionRequest $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 Partition - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPartition(GetPartitionRequest $request, array $callOptions = []): Partition - { - return $this->startApiCall('GetPartition', $request, $callOptions)->wait(); - } - - /** - * List metadata entities in a zone. - * - * The async variant is {@see MetadataServiceClient::listEntitiesAsync()} . - * - * @example samples/V1/MetadataServiceClient/list_entities.php - * - * @param ListEntitiesRequest $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 listEntities(ListEntitiesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntities', $request, $callOptions); - } - - /** - * List metadata partitions of an entity. - * - * The async variant is {@see MetadataServiceClient::listPartitionsAsync()} . - * - * @example samples/V1/MetadataServiceClient/list_partitions.php - * - * @param ListPartitionsRequest $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 listPartitions(ListPartitionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPartitions', $request, $callOptions); - } - - /** - * Update a metadata entity. Only supports full resource update. - * - * The async variant is {@see MetadataServiceClient::updateEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/update_entity.php - * - * @param UpdateEntityRequest $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 Entity - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntity(UpdateEntityRequest $request, array $callOptions = []): Entity - { - return $this->startApiCall('UpdateEntity', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see MetadataServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see MetadataServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/MetadataServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see MetadataServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/MetadataServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see MetadataServiceClient::getLocationAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see MetadataServiceClient::listLocationsAsync()} . - * - * @example samples/V1/MetadataServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php deleted file mode 100644 index 944c7d472a65..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ -lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $content = new Content(); - * $response = $contentServiceClient->createContent($formattedParent, $content); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataplex\V1\Client\ContentServiceClient} to use the new surface. - */ -class ContentServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.ContentService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $contentNameTemplate; - - private static $lakeNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/content_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/content_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/content_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/content_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getContentNameTemplate() - { - if (self::$contentNameTemplate == null) { - self::$contentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/content/{content}'); - } - - return self::$contentNameTemplate; - } - - private static function getLakeNameTemplate() - { - if (self::$lakeNameTemplate == null) { - self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}'); - } - - return self::$lakeNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'content' => self::getContentNameTemplate(), - 'lake' => self::getLakeNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a content - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $content - * - * @return string The formatted content resource. - */ - public static function contentName($project, $location, $lake, $content) - { - return self::getContentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'content' => $content, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName($project, $location, $lake) - { - return self::getLakeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - content: projects/{project}/locations/{location}/lakes/{lake}/content/{content} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Create a content. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedParent = $contentServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $content = new Content(); - * $response = $contentServiceClient->createContent($formattedParent, $content); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param Content $content Required. Content resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Content - * - * @throws ApiException if the remote call fails - */ - public function createContent($parent, $content, array $optionalArgs = []) - { - $request = new CreateContentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setContent($content); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateContent', Content::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete a content. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedName = $contentServiceClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - * $contentServiceClient->deleteContent($formattedName); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteContent($name, array $optionalArgs = []) - { - $request = new DeleteContentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteContent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a content resource. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedName = $contentServiceClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - * $response = $contentServiceClient->getContent($formattedName); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Specify content view to make a partial request. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetContentRequest\ContentView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Content - * - * @throws ApiException if the remote call fails - */ - public function getContent($name, array $optionalArgs = []) - { - $request = new GetContentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetContent', Content::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a contentitem resource. A `NOT_FOUND` - * error is returned if the resource does not exist. An empty policy is - * returned if the resource exists but does not have a policy set on it. - * - * Caller must have Google IAM `dataplex.content.getIamPolicy` permission - * on the resource. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $resource = 'resource'; - * $response = $contentServiceClient->getIamPolicy($resource); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * List content. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedParent = $contentServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $contentServiceClient->listContent($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contentServiceClient->listContent($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listContent($parent, array $optionalArgs = []) - { - $request = new ListContentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListContent', $optionalArgs, ListContentResponse::class, $request); - } - - /** - * Sets the access control policy on the specified contentitem resource. - * Replaces any existing policy. - * - * Caller must have Google IAM `dataplex.content.setIamPolicy` permission - * on the resource. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $contentServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the caller's permissions on a resource. - * If the resource does not exist, an empty set of - * permissions is returned (a `NOT_FOUND` error is not returned). - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $contentServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Update a content. Only supports full resource update. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $content = new Content(); - * $response = $contentServiceClient->updateContent($updateMask, $content); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Content $content Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Content - * - * @throws ApiException if the remote call fails - */ - public function updateContent($updateMask, $content, array $optionalArgs = []) - { - $request = new UpdateContentRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setContent($content); - $requestParamHeaders['content.name'] = $content->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateContent', Content::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $response = $contentServiceClient->getLocation(); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $contentServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contentServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php deleted file mode 100644 index fb97c9751cad..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php +++ /dev/null @@ -1,1258 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $dataScan = new DataScan(); - * $dataScanId = 'data_scan_id'; - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'createDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataplex\V1\Client\DataScanServiceClient} to use the new surface. - */ -class DataScanServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.DataScanService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $dataScanNameTemplate; - - private static $dataScanJobNameTemplate; - - private static $entityNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_scan_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_scan_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_scan_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_scan_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getDataScanNameTemplate() - { - if (self::$dataScanNameTemplate == null) { - self::$dataScanNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataScans/{dataScan}'); - } - - return self::$dataScanNameTemplate; - } - - private static function getDataScanJobNameTemplate() - { - if (self::$dataScanJobNameTemplate == null) { - self::$dataScanJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}'); - } - - return self::$dataScanJobNameTemplate; - } - - private static function getEntityNameTemplate() - { - if (self::$entityNameTemplate == null) { - self::$entityNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}'); - } - - return self::$entityNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'dataScan' => self::getDataScanNameTemplate(), - 'dataScanJob' => self::getDataScanJobNameTemplate(), - 'entity' => self::getEntityNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_scan - * resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * - * @return string The formatted data_scan resource. - */ - public static function dataScanName($project, $location, $dataScan) - { - return self::getDataScanNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_scan_job resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * @param string $job - * - * @return string The formatted data_scan_job resource. - */ - public static function dataScanJobName($project, $location, $dataScan, $job) - { - return self::getDataScanJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName($project, $location, $lake, $zone, $entity) - { - return self::getEntityNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataScan: projects/{project}/locations/{location}/dataScans/{dataScan} - * - dataScanJob: projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job} - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedParent = $dataScanServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataScan = new DataScan(); - * $dataScanId = 'data_scan_id'; - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'createDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param DataScan $dataScan Required. DataScan resource. - * @param string $dataScanId Required. DataScan identifier. - * - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataScan($parent, $dataScan, $dataScanId, array $optionalArgs = []) - { - $request = new CreateDataScanRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataScan($dataScan); - $request->setDataScanId($dataScanId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * $operationResponse = $dataScanServiceClient->deleteDataScan($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->deleteDataScan($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'deleteDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataScan($name, array $optionalArgs = []) - { - $request = new DeleteDataScanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * $response = $dataScanServiceClient->getDataScan($formattedName); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetDataScanRequest\DataScanView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataScan - * - * @throws ApiException if the remote call fails - */ - public function getDataScan($name, array $optionalArgs = []) - { - $request = new GetDataScanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataScan', DataScan::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a DataScanJob resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - * $response = $dataScanServiceClient->getDataScanJob($formattedName); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetDataScanJobRequest\DataScanJobView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataScanJob - * - * @throws ApiException if the remote call fails - */ - public function getDataScanJob($name, array $optionalArgs = []) - { - $request = new GetDataScanJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataScanJob', DataScanJob::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists DataScanJobs under the given DataScan. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedParent = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * // Iterate over pages of elements - * $pagedResponse = $dataScanServiceClient->listDataScanJobs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataScanServiceClient->listDataScanJobs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * - * Allowed fields are: - * - * - `start_time` - * - `end_time` - * - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataScanJobs($parent, array $optionalArgs = []) - { - $request = new ListDataScanJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataScanJobs', $optionalArgs, ListDataScanJobsResponse::class, $request); - } - - /** - * Lists DataScans. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedParent = $dataScanServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataScanServiceClient->listDataScans($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataScanServiceClient->listDataScans($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataScans($parent, array $optionalArgs = []) - { - $request = new ListDataScansRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataScans', $optionalArgs, ListDataScansResponse::class, $request); - } - - /** - * Runs an on-demand execution of a DataScan - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * $response = $dataScanServiceClient->runDataScan($formattedName); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Only **OnDemand** data scans are allowed. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\RunDataScanResponse - * - * @throws ApiException if the remote call fails - */ - public function runDataScan($name, array $optionalArgs = []) - { - $request = new RunDataScanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunDataScan', RunDataScanResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $dataScan = new DataScan(); - * $updateMask = new FieldMask(); - * $operationResponse = $dataScanServiceClient->updateDataScan($dataScan, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->updateDataScan($dataScan, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'updateDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param DataScan $dataScan Required. DataScan resource to be updated. - * - * Only fields specified in `update_mask` are updated. - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataScan($dataScan, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDataScanRequest(); - $requestParamHeaders = []; - $request->setDataScan($dataScan); - $request->setUpdateMask($updateMask); - $requestParamHeaders['data_scan.name'] = $dataScan->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $resource = 'resource'; - * $response = $dataScanServiceClient->getIamPolicy($resource); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $dataScanServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $dataScanServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $response = $dataScanServiceClient->getLocation(); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $dataScanServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataScanServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php deleted file mode 100644 index c7a718ca8964..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php +++ /dev/null @@ -1,1768 +0,0 @@ -dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $dataAttributeId = 'data_attribute_id'; - * $dataAttribute = new DataAttribute(); - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataplex\V1\Client\DataTaxonomyServiceClient} to use the new - * surface. - */ -class DataTaxonomyServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.DataTaxonomyService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $dataAttributeNameTemplate; - - private static $dataAttributeBindingNameTemplate; - - private static $dataTaxonomyNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_taxonomy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getDataAttributeNameTemplate() - { - if (self::$dataAttributeNameTemplate == null) { - self::$dataAttributeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}'); - } - - return self::$dataAttributeNameTemplate; - } - - private static function getDataAttributeBindingNameTemplate() - { - if (self::$dataAttributeBindingNameTemplate == null) { - self::$dataAttributeBindingNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}'); - } - - return self::$dataAttributeBindingNameTemplate; - } - - private static function getDataTaxonomyNameTemplate() - { - if (self::$dataTaxonomyNameTemplate == null) { - self::$dataTaxonomyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}'); - } - - return self::$dataTaxonomyNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'dataAttribute' => self::getDataAttributeNameTemplate(), - 'dataAttributeBinding' => self::getDataAttributeBindingNameTemplate(), - 'dataTaxonomy' => self::getDataTaxonomyNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomy - * @param string $dataAttributeId - * - * @return string The formatted data_attribute resource. - */ - public static function dataAttributeName($project, $location, $dataTaxonomy, $dataAttributeId) - { - return self::getDataAttributeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataTaxonomy' => $dataTaxonomy, - 'data_attribute_id' => $dataAttributeId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute_binding resource. - * - * @param string $project - * @param string $location - * @param string $dataAttributeBindingId - * - * @return string The formatted data_attribute_binding resource. - */ - public static function dataAttributeBindingName($project, $location, $dataAttributeBindingId) - { - return self::getDataAttributeBindingNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'data_attribute_binding_id' => $dataAttributeBindingId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_taxonomy resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomyId - * - * @return string The formatted data_taxonomy resource. - */ - public static function dataTaxonomyName($project, $location, $dataTaxonomyId) - { - return self::getDataTaxonomyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'data_taxonomy_id' => $dataTaxonomyId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataAttribute: projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - dataAttributeBinding: projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - dataTaxonomy: projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Create a DataAttribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $dataAttributeId = 'data_attribute_id'; - * $dataAttribute = new DataAttribute(); - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param string $dataAttributeId Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * @param DataAttribute $dataAttribute Required. DataAttribute resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataAttribute($parent, $dataAttributeId, $dataAttribute, array $optionalArgs = []) - { - $request = new CreateDataAttributeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataAttributeId($dataAttributeId); - $request->setDataAttribute($dataAttribute); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create a DataAttributeBinding resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataAttributeBindingId = 'data_attribute_binding_id'; - * $dataAttributeBinding = new DataAttributeBinding(); - * $operationResponse = $dataTaxonomyServiceClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttributeBinding'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * @param string $dataAttributeBindingId Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * @param DataAttributeBinding $dataAttributeBinding Required. DataAttributeBinding resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataAttributeBinding($parent, $dataAttributeBindingId, $dataAttributeBinding, array $optionalArgs = []) - { - $request = new CreateDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataAttributeBindingId($dataAttributeBindingId); - $request->setDataAttributeBinding($dataAttributeBinding); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create a DataTaxonomy resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataTaxonomyId = 'data_taxonomy_id'; - * $dataTaxonomy = new DataTaxonomy(); - * $operationResponse = $dataTaxonomyServiceClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataTaxonomy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param string $dataTaxonomyId Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * @param DataTaxonomy $dataTaxonomy Required. DataTaxonomy resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataTaxonomy($parent, $dataTaxonomyId, $dataTaxonomy, array $optionalArgs = []) - { - $request = new CreateDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataTaxonomyId($dataTaxonomyId); - $request->setDataTaxonomy($dataTaxonomy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a Data Attribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttribute($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttribute($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataAttribute($name, array $optionalArgs = []) - { - $request = new DeleteDataAttributeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a DataAttributeBinding resource. All attributes within the - * DataAttributeBinding must be deleted before the DataAttributeBinding can be - * deleted. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - * $etag = 'etag'; - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttributeBinding($formattedName, $etag); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttributeBinding($formattedName, $etag); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataAttributeBinding'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * @param string $etag Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataAttributeBinding($name, $etag, array $optionalArgs = []) - { - $request = new DeleteDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setEtag($etag); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - * must be deleted before the DataTaxonomy can be deleted. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $operationResponse = $dataTaxonomyServiceClient->deleteDataTaxonomy($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->deleteDataTaxonomy($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataTaxonomy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataTaxonomy($name, array $optionalArgs = []) - { - $request = new DeleteDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves a Data Attribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - * $response = $dataTaxonomyServiceClient->getDataAttribute($formattedName); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataAttribute - * - * @throws ApiException if the remote call fails - */ - public function getDataAttribute($name, array $optionalArgs = []) - { - $request = new GetDataAttributeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataAttribute', DataAttribute::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a DataAttributeBinding resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - * $response = $dataTaxonomyServiceClient->getDataAttributeBinding($formattedName); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding - * - * @throws ApiException if the remote call fails - */ - public function getDataAttributeBinding($name, array $optionalArgs = []) - { - $request = new GetDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataAttributeBinding', DataAttributeBinding::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a DataTaxonomy resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $response = $dataTaxonomyServiceClient->getDataTaxonomy($formattedName); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataTaxonomy - * - * @throws ApiException if the remote call fails - */ - public function getDataTaxonomy($name, array $optionalArgs = []) - { - $request = new GetDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataTaxonomy', DataTaxonomy::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists DataAttributeBinding resources in a project and location. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributeBindings($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributeBindings($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataAttributeBindings($parent, array $optionalArgs = []) - { - $request = new ListDataAttributeBindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataAttributeBindings', $optionalArgs, ListDataAttributeBindingsResponse::class, $request); - } - - /** - * Lists Data Attribute resources in a DataTaxonomy. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataAttributes($parent, array $optionalArgs = []) - { - $request = new ListDataAttributesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataAttributes', $optionalArgs, ListDataAttributesResponse::class, $request); - } - - /** - * Lists DataTaxonomy resources in a project and location. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataTaxonomies($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataTaxonomies($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataTaxonomies($parent, array $optionalArgs = []) - { - $request = new ListDataTaxonomiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataTaxonomies', $optionalArgs, ListDataTaxonomiesResponse::class, $request); - } - - /** - * Updates a DataAttribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $dataAttribute = new DataAttribute(); - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttribute($updateMask, $dataAttribute); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttribute($updateMask, $dataAttribute); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param DataAttribute $dataAttribute Required. Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataAttribute($updateMask, $dataAttribute, array $optionalArgs = []) - { - $request = new UpdateDataAttributeRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setDataAttribute($dataAttribute); - $requestParamHeaders['data_attribute.name'] = $dataAttribute->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a DataAttributeBinding resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $dataAttributeBinding = new DataAttributeBinding(); - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataAttributeBinding'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param DataAttributeBinding $dataAttributeBinding Required. Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataAttributeBinding($updateMask, $dataAttributeBinding, array $optionalArgs = []) - { - $request = new UpdateDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setDataAttributeBinding($dataAttributeBinding); - $requestParamHeaders['data_attribute_binding.name'] = $dataAttributeBinding->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a DataTaxonomy resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $dataTaxonomy = new DataTaxonomy(); - * $operationResponse = $dataTaxonomyServiceClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataTaxonomy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param DataTaxonomy $dataTaxonomy Required. Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataTaxonomy($updateMask, $dataTaxonomy, array $optionalArgs = []) - { - $request = new UpdateDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setDataTaxonomy($dataTaxonomy); - $requestParamHeaders['data_taxonomy.name'] = $dataTaxonomy->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $resource = 'resource'; - * $response = $dataTaxonomyServiceClient->getIamPolicy($resource); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $dataTaxonomyServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $dataTaxonomyServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $response = $dataTaxonomyServiceClient->getLocation(); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php deleted file mode 100644 index d1182b42ab0f..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php +++ /dev/null @@ -1,3045 +0,0 @@ -jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - * $dataplexServiceClient->cancelJob($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataplex\V1\Client\DataplexServiceClient} to use the new surface. - */ -class DataplexServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.DataplexService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $assetNameTemplate; - - private static $environmentNameTemplate; - - private static $jobNameTemplate; - - private static $lakeNameTemplate; - - private static $locationNameTemplate; - - private static $taskNameTemplate; - - private static $zoneNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/dataplex_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/dataplex_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/dataplex_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/dataplex_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAssetNameTemplate() - { - if (self::$assetNameTemplate == null) { - self::$assetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}'); - } - - return self::$assetNameTemplate; - } - - private static function getEnvironmentNameTemplate() - { - if (self::$environmentNameTemplate == null) { - self::$environmentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}'); - } - - return self::$environmentNameTemplate; - } - - private static function getJobNameTemplate() - { - if (self::$jobNameTemplate == null) { - self::$jobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}'); - } - - return self::$jobNameTemplate; - } - - private static function getLakeNameTemplate() - { - if (self::$lakeNameTemplate == null) { - self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}'); - } - - return self::$lakeNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getTaskNameTemplate() - { - if (self::$taskNameTemplate == null) { - self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}'); - } - - return self::$taskNameTemplate; - } - - private static function getZoneNameTemplate() - { - if (self::$zoneNameTemplate == null) { - self::$zoneNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}'); - } - - return self::$zoneNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'asset' => self::getAssetNameTemplate(), - 'environment' => self::getEnvironmentNameTemplate(), - 'job' => self::getJobNameTemplate(), - 'lake' => self::getLakeNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'task' => self::getTaskNameTemplate(), - 'zone' => self::getZoneNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a asset - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $asset - * - * @return string The formatted asset resource. - */ - public static function assetName($project, $location, $lake, $zone, $asset) - { - return self::getAssetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName($project, $location, $lake, $environment) - { - return self::getEnvironmentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName($project, $location, $lake, $task, $job) - { - return self::getJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName($project, $location, $lake) - { - return self::getLakeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName($project, $location, $lake, $task) - { - return self::getTaskNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName($project, $location, $lake, $zone) - { - return self::getZoneNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - asset: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset} - * - environment: projects/{project}/locations/{location}/lakes/{lake}/environments/{environment} - * - job: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - location: projects/{project}/locations/{location} - * - task: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Cancel jobs running for the task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - * $dataplexServiceClient->cancelJob($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function cancelJob($name, array $optionalArgs = []) - { - $request = new CancelJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CancelJob', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an asset resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $assetId = 'asset_id'; - * $asset = new Asset(); - * $operationResponse = $dataplexServiceClient->createAsset($formattedParent, $assetId, $asset); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createAsset($formattedParent, $assetId, $asset); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createAsset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param string $assetId Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * @param Asset $asset Required. Asset resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAsset($parent, $assetId, $asset, array $optionalArgs = []) - { - $request = new CreateAssetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAssetId($assetId); - $request->setAsset($asset); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create an environment resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $environmentId = 'environment_id'; - * $environment = new Environment(); - * $operationResponse = $dataplexServiceClient->createEnvironment($formattedParent, $environmentId, $environment); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createEnvironment($formattedParent, $environmentId, $environment); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createEnvironment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param string $environmentId Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * @param Environment $environment Required. Environment resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createEnvironment($parent, $environmentId, $environment, array $optionalArgs = []) - { - $request = new CreateEnvironmentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEnvironmentId($environmentId); - $request->setEnvironment($environment); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a lake resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $lakeId = 'lake_id'; - * $lake = new Lake(); - * $operationResponse = $dataplexServiceClient->createLake($formattedParent, $lakeId, $lake); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createLake($formattedParent, $lakeId, $lake); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createLake'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param string $lakeId Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @param Lake $lake Required. Lake resource - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createLake($parent, $lakeId, $lake, array $optionalArgs = []) - { - $request = new CreateLakeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setLakeId($lakeId); - $request->setLake($lake); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a task resource within a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $taskId = 'task_id'; - * $task = new Task(); - * $operationResponse = $dataplexServiceClient->createTask($formattedParent, $taskId, $task); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createTask($formattedParent, $taskId, $task); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createTask'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param string $taskId Required. Task identifier. - * @param Task $task Required. Task resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createTask($parent, $taskId, $task, array $optionalArgs = []) - { - $request = new CreateTaskRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTaskId($taskId); - $request->setTask($task); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a zone resource within a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $zoneId = 'zone_id'; - * $zone = new Zone(); - * $operationResponse = $dataplexServiceClient->createZone($formattedParent, $zoneId, $zone); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createZone($formattedParent, $zoneId, $zone); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createZone'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param string $zoneId Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * @param Zone $zone Required. Zone resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createZone($parent, $zoneId, $zone, array $optionalArgs = []) - { - $request = new CreateZoneRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setZoneId($zoneId); - $request->setZone($zone); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an asset resource. The referenced storage resource is detached - * (default) or deleted based on the associated Lifecycle policy. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - * $operationResponse = $dataplexServiceClient->deleteAsset($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteAsset($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteAsset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAsset($name, array $optionalArgs = []) - { - $request = new DeleteAssetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Delete the environment resource. All the child resources must have been - * deleted before environment deletion can be initiated. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - * $operationResponse = $dataplexServiceClient->deleteEnvironment($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteEnvironment($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteEnvironment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteEnvironment($name, array $optionalArgs = []) - { - $request = new DeleteEnvironmentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a lake resource. All zones within the lake must be deleted before - * the lake can be deleted. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $operationResponse = $dataplexServiceClient->deleteLake($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteLake($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteLake'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteLake($name, array $optionalArgs = []) - { - $request = new DeleteLakeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Delete the task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * $operationResponse = $dataplexServiceClient->deleteTask($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteTask($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteTask'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteTask($name, array $optionalArgs = []) - { - $request = new DeleteTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a zone resource. All assets within a zone must be deleted before - * the zone can be deleted. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $operationResponse = $dataplexServiceClient->deleteZone($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteZone($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteZone'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteZone($name, array $optionalArgs = []) - { - $request = new DeleteZoneRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves an asset resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - * $response = $dataplexServiceClient->getAsset($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Asset - * - * @throws ApiException if the remote call fails - */ - public function getAsset($name, array $optionalArgs = []) - { - $request = new GetAssetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAsset', Asset::class, $optionalArgs, $request)->wait(); - } - - /** - * Get environment resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - * $response = $dataplexServiceClient->getEnvironment($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Environment - * - * @throws ApiException if the remote call fails - */ - public function getEnvironment($name, array $optionalArgs = []) - { - $request = new GetEnvironmentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEnvironment', Environment::class, $optionalArgs, $request)->wait(); - } - - /** - * Get job resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - * $response = $dataplexServiceClient->getJob($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function getJob($name, array $optionalArgs = []) - { - $request = new GetJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a lake resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $response = $dataplexServiceClient->getLake($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Lake - * - * @throws ApiException if the remote call fails - */ - public function getLake($name, array $optionalArgs = []) - { - $request = new GetLakeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLake', Lake::class, $optionalArgs, $request)->wait(); - } - - /** - * Get task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * $response = $dataplexServiceClient->getTask($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Task - * - * @throws ApiException if the remote call fails - */ - public function getTask($name, array $optionalArgs = []) - { - $request = new GetTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a zone resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $response = $dataplexServiceClient->getZone($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Zone - * - * @throws ApiException if the remote call fails - */ - public function getZone($name, array $optionalArgs = []) - { - $request = new GetZoneRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetZone', Zone::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists action resources in an asset. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listAssetActions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listAssetActions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAssetActions($parent, array $optionalArgs = []) - { - $request = new ListAssetActionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAssetActions', $optionalArgs, ListActionsResponse::class, $request); - } - - /** - * Lists asset resources in a zone. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listAssets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listAssets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAssets($parent, array $optionalArgs = []) - { - $request = new ListAssetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAssets', $optionalArgs, ListAssetsResponse::class, $request); - } - - /** - * Lists environments under the given lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listEnvironments($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listEnvironments($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEnvironments($parent, array $optionalArgs = []) - { - $request = new ListEnvironmentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEnvironments', $optionalArgs, ListEnvironmentsResponse::class, $request); - } - - /** - * Lists Jobs under the given task. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listJobs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listJobs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listJobs($parent, array $optionalArgs = []) - { - $request = new ListJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListJobs', $optionalArgs, ListJobsResponse::class, $request); - } - - /** - * Lists action resources in a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listLakeActions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listLakeActions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLakeActions($parent, array $optionalArgs = []) - { - $request = new ListLakeActionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLakeActions', $optionalArgs, ListActionsResponse::class, $request); - } - - /** - * Lists lake resources in a project and location. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listLakes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listLakes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLakes($parent, array $optionalArgs = []) - { - $request = new ListLakesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLakes', $optionalArgs, ListLakesResponse::class, $request); - } - - /** - * Lists session resources in an environment. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listSessions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listSessions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * - * mode = ADMIN | USER - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSessions($parent, array $optionalArgs = []) - { - $request = new ListSessionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSessions', $optionalArgs, ListSessionsResponse::class, $request); - } - - /** - * Lists tasks under the given lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listTasks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listTasks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTasks($parent, array $optionalArgs = []) - { - $request = new ListTasksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); - } - - /** - * Lists action resources in a zone. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listZoneActions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listZoneActions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listZoneActions($parent, array $optionalArgs = []) - { - $request = new ListZoneActionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListZoneActions', $optionalArgs, ListActionsResponse::class, $request); - } - - /** - * Lists zone resources in a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listZones($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listZones($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listZones($parent, array $optionalArgs = []) - { - $request = new ListZonesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListZones', $optionalArgs, ListZonesResponse::class, $request); - } - - /** - * Run an on demand execution of a Task. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * $response = $dataplexServiceClient->runTask($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type array $labels - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * @type array $args - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\RunTaskResponse - * - * @throws ApiException if the remote call fails - */ - public function runTask($name, array $optionalArgs = []) - { - $request = new RunTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - if (isset($optionalArgs['args'])) { - $request->setArgs($optionalArgs['args']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunTask', RunTaskResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an asset resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $asset = new Asset(); - * $operationResponse = $dataplexServiceClient->updateAsset($updateMask, $asset); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateAsset($updateMask, $asset); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateAsset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Asset $asset Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAsset($updateMask, $asset, array $optionalArgs = []) - { - $request = new UpdateAssetRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setAsset($asset); - $requestParamHeaders['asset.name'] = $asset->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update the environment resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $environment = new Environment(); - * $operationResponse = $dataplexServiceClient->updateEnvironment($updateMask, $environment); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateEnvironment($updateMask, $environment); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateEnvironment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Environment $environment Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateEnvironment($updateMask, $environment, array $optionalArgs = []) - { - $request = new UpdateEnvironmentRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setEnvironment($environment); - $requestParamHeaders['environment.name'] = $environment->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a lake resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $lake = new Lake(); - * $operationResponse = $dataplexServiceClient->updateLake($updateMask, $lake); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateLake($updateMask, $lake); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateLake'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Lake $lake Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateLake($updateMask, $lake, array $optionalArgs = []) - { - $request = new UpdateLakeRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setLake($lake); - $requestParamHeaders['lake.name'] = $lake->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update the task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $task = new Task(); - * $operationResponse = $dataplexServiceClient->updateTask($updateMask, $task); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateTask($updateMask, $task); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateTask'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Task $task Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateTask($updateMask, $task, array $optionalArgs = []) - { - $request = new UpdateTaskRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setTask($task); - $requestParamHeaders['task.name'] = $task->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a zone resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $zone = new Zone(); - * $operationResponse = $dataplexServiceClient->updateZone($updateMask, $zone); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateZone($updateMask, $zone); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateZone'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Zone $zone Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateZone($updateMask, $zone, array $optionalArgs = []) - { - $request = new UpdateZoneRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setZone($zone); - $requestParamHeaders['zone.name'] = $zone->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $resource = 'resource'; - * $response = $dataplexServiceClient->getIamPolicy($resource); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $dataplexServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $dataplexServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $response = $dataplexServiceClient->getLocation(); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php deleted file mode 100644 index 986a8c22c5af..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php +++ /dev/null @@ -1,1132 +0,0 @@ -zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $entity = new Entity(); - * $response = $metadataServiceClient->createEntity($formattedParent, $entity); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataplex\V1\Client\MetadataServiceClient} to use the new surface. - */ -class MetadataServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.MetadataService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $entityNameTemplate; - - private static $partitionNameTemplate; - - private static $zoneNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metadata_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metadata_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metadata_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metadata_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getEntityNameTemplate() - { - if (self::$entityNameTemplate == null) { - self::$entityNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}'); - } - - return self::$entityNameTemplate; - } - - private static function getPartitionNameTemplate() - { - if (self::$partitionNameTemplate == null) { - self::$partitionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}'); - } - - return self::$partitionNameTemplate; - } - - private static function getZoneNameTemplate() - { - if (self::$zoneNameTemplate == null) { - self::$zoneNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}'); - } - - return self::$zoneNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'entity' => self::getEntityNameTemplate(), - 'partition' => self::getPartitionNameTemplate(), - 'zone' => self::getZoneNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName($project, $location, $lake, $zone, $entity) - { - return self::getEntityNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a partition - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * @param string $partition - * - * @return string The formatted partition resource. - */ - public static function partitionName($project, $location, $lake, $zone, $entity, $partition) - { - return self::getPartitionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - 'partition' => $partition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName($project, $location, $lake, $zone) - { - return self::getZoneNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - partition: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Create a metadata entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $entity = new Entity(); - * $response = $metadataServiceClient->createEntity($formattedParent, $entity); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param Entity $entity Required. Entity resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entity - * - * @throws ApiException if the remote call fails - */ - public function createEntity($parent, $entity, array $optionalArgs = []) - { - $request = new CreateEntityRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntity($entity); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEntity', Entity::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a metadata partition. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * $partition = new Partition(); - * $response = $metadataServiceClient->createPartition($formattedParent, $partition); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param Partition $partition Required. Partition resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Partition - * - * @throws ApiException if the remote call fails - */ - public function createPartition($parent, $partition, array $optionalArgs = []) - { - $request = new CreatePartitionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPartition($partition); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreatePartition', Partition::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete a metadata entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * $etag = 'etag'; - * $metadataServiceClient->deleteEntity($formattedName, $etag); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param string $etag Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteEntity($name, $etag, array $optionalArgs = []) - { - $request = new DeleteEntityRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setEtag($etag); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEntity', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete a metadata partition. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - * $metadataServiceClient->deletePartition($formattedName); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. The etag associated with the partition. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deletePartition($name, array $optionalArgs = []) - { - $request = new DeletePartitionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeletePartition', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a metadata entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * $response = $metadataServiceClient->getEntity($formattedName); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetEntityRequest\EntityView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entity - * - * @throws ApiException if the remote call fails - */ - public function getEntity($name, array $optionalArgs = []) - { - $request = new GetEntityRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntity', Entity::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a metadata partition of an entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - * $response = $metadataServiceClient->getPartition($formattedName); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Partition - * - * @throws ApiException if the remote call fails - */ - public function getPartition($name, array $optionalArgs = []) - { - $request = new GetPartitionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetPartition', Partition::class, $optionalArgs, $request)->wait(); - } - - /** - * List metadata entities in a zone. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - * // Iterate over pages of elements - * $pagedResponse = $metadataServiceClient->listEntities($formattedParent, $view); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metadataServiceClient->listEntities($formattedParent, $view); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param int $view Required. Specify the entity view to make a partial list request. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\ListEntitiesRequest\EntityView} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEntities($parent, $view, array $optionalArgs = []) - { - $request = new ListEntitiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setView($view); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEntities', $optionalArgs, ListEntitiesResponse::class, $request); - } - - /** - * List metadata partitions of an entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * // Iterate over pages of elements - * $pagedResponse = $metadataServiceClient->listPartitions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metadataServiceClient->listPartitions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * - * **Notes:** - * - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listPartitions($parent, array $optionalArgs = []) - { - $request = new ListPartitionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListPartitions', $optionalArgs, ListPartitionsResponse::class, $request); - } - - /** - * Update a metadata entity. Only supports full resource update. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $entity = new Entity(); - * $response = $metadataServiceClient->updateEntity($entity); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param Entity $entity Required. Update description. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entity - * - * @throws ApiException if the remote call fails - */ - public function updateEntity($entity, array $optionalArgs = []) - { - $request = new UpdateEntityRequest(); - $requestParamHeaders = []; - $request->setEntity($entity); - $requestParamHeaders['entity.name'] = $entity->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEntity', Entity::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $resource = 'resource'; - * $response = $metadataServiceClient->getIamPolicy($resource); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $metadataServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $metadataServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $response = $metadataServiceClient->getLocation(); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $metadataServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metadataServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php deleted file mode 100644 index 630ed7e7aae7..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.dataplex.v1.ContentService' => [ - 'CreateContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Content', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Content', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'ListContent' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getContent', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListContentResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Content', - 'headerParams' => [ - [ - 'keyName' => 'content.name', - 'fieldAccessors' => [ - 'getContent', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'content' => 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}', - 'lake' => 'projects/{project}/locations/{location}/lakes/{lake}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php deleted file mode 100644 index a108de8fb9e9..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php +++ /dev/null @@ -1,442 +0,0 @@ - [ - 'google.cloud.dataplex.v1.ContentService' => [ - 'CreateContent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/contentitems', - 'body' => 'content', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/content', - 'body' => 'content', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteContent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/content/**}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetContent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/content/**}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'ListContent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/contentitems', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/content', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateContent' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}', - 'body' => 'content', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{content.name=projects/*/locations/*/lakes/*/content/**}', - 'body' => 'content', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'content.name' => [ - 'getters' => [ - 'getContent', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json deleted file mode 100644 index d41ec81cafd9..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataScanService": { - "retry_codes": { - "no_retry_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 - } - }, - "methods": { - "CreateDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataScanJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataScanJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataScans": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RunDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php deleted file mode 100644 index 25e6c0424867..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php +++ /dev/null @@ -1,221 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataScanService' => [ - 'CreateDataScan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataScan', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataScan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataScan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataScan', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_scan.name', - 'fieldAccessors' => [ - 'getDataScan', - 'getName', - ], - ], - ], - ], - 'GetDataScan' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataScan', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataScanJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataScanJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataScanJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataScanJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataScanJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataScans' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataScans', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataScansResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunDataScan' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\RunDataScanResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'dataScan' => 'projects/{project}/locations/{location}/dataScans/{dataScan}', - 'dataScanJob' => 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}', - 'entity' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php deleted file mode 100644 index 320d48a5f776..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php +++ /dev/null @@ -1,389 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataScanService' => [ - 'CreateDataScan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataScans', - 'body' => 'data_scan', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_scan_id', - ], - ], - 'DeleteDataScan' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataScan' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataScanJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataScanJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataScans/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataScans' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataScans', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunDataScan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataScan' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_scan.name=projects/*/locations/*/dataScans/*}', - 'body' => 'data_scan', - 'placeholders' => [ - 'data_scan.name' => [ - 'getters' => [ - 'getDataScan', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json deleted file mode 100644 index b1b81f5e2027..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataTaxonomyService": { - "retry_codes": { - "no_retry_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 - } - }, - "methods": { - "CreateDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataAttributeBindings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataAttributes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php deleted file mode 100644 index 48dcbb5a034a..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php +++ /dev/null @@ -1,357 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataTaxonomyService' => [ - 'CreateDataAttribute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttribute', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataAttributeBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttributeBinding', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataTaxonomy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataTaxonomy', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataAttribute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataAttributeBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataTaxonomy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataAttribute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttribute', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_attribute.name', - 'fieldAccessors' => [ - 'getDataAttribute', - 'getName', - ], - ], - ], - ], - 'UpdateDataAttributeBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttributeBinding', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_attribute_binding.name', - 'fieldAccessors' => [ - 'getDataAttributeBinding', - 'getName', - ], - ], - ], - ], - 'UpdateDataTaxonomy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataTaxonomy', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_taxonomy.name', - 'fieldAccessors' => [ - 'getDataTaxonomy', - 'getName', - ], - ], - ], - ], - 'GetDataAttribute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataAttribute', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAttributeBinding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataAttributeBinding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataTaxonomy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataTaxonomy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataAttributeBindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataAttributeBindings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataAttributeBindingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataAttributes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataAttributes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataAttributesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataTaxonomies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataTaxonomies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataTaxonomiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'dataAttribute' => 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}', - 'dataAttributeBinding' => 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}', - 'dataTaxonomy' => 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php deleted file mode 100644 index f8b9cff8373a..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php +++ /dev/null @@ -1,486 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataTaxonomyService' => [ - 'CreateDataAttribute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes', - 'body' => 'data_attribute', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_attribute_id', - ], - ], - 'CreateDataAttributeBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataAttributeBindings', - 'body' => 'data_attribute_binding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_attribute_binding_id', - ], - ], - 'CreateDataTaxonomy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataTaxonomies', - 'body' => 'data_taxonomy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_taxonomy_id', - ], - ], - 'DeleteDataAttribute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataAttributeBinding' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataAttributeBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'etag', - ], - ], - 'DeleteDataTaxonomy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAttribute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAttributeBinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataAttributeBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataTaxonomy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataAttributeBindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataAttributeBindings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataAttributes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataTaxonomies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataTaxonomies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDataAttribute' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', - 'body' => 'data_attribute', - 'placeholders' => [ - 'data_attribute.name' => [ - 'getters' => [ - 'getDataAttribute', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDataAttributeBinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}', - 'body' => 'data_attribute_binding', - 'placeholders' => [ - 'data_attribute_binding.name' => [ - 'getters' => [ - 'getDataAttributeBinding', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDataTaxonomy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}', - 'body' => 'data_taxonomy', - 'placeholders' => [ - 'data_taxonomy.name' => [ - 'getters' => [ - 'getDataTaxonomy', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json deleted file mode 100644 index f7ce616175a3..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataplexService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_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": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "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": { - "CancelJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateLake": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateZone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteLake": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteZone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLake": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTask": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetZone": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAssetActions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListAssets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListEnvironments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListLakeActions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListLakes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListSessions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListTasks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListZoneActions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListZones": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "RunTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateLake": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateZone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php deleted file mode 100644 index bd5f19c4c2d4..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php +++ /dev/null @@ -1,676 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataplexService' => [ - 'CreateAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Asset', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Environment', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLake' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Lake', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTask' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Task', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateZone' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Zone', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLake' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteZone' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Asset', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'asset.name', - 'fieldAccessors' => [ - 'getAsset', - 'getName', - ], - ], - ], - ], - 'UpdateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Environment', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment.name', - 'fieldAccessors' => [ - 'getEnvironment', - 'getName', - ], - ], - ], - ], - 'UpdateLake' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Lake', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'lake.name', - 'fieldAccessors' => [ - 'getLake', - 'getName', - ], - ], - ], - ], - 'UpdateTask' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Task', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'task.name', - 'fieldAccessors' => [ - 'getTask', - 'getName', - ], - ], - ], - ], - 'UpdateZone' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Zone', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'zone.name', - 'fieldAccessors' => [ - 'getZone', - 'getName', - ], - ], - ], - ], - 'CancelJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Environment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLake' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Lake', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Task', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetZone' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Zone', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAssetActions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getActions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEnvironments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListEnvironmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakeActions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getActions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLakes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListLakesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSessions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSessions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListSessionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListZoneActions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getActions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListZones' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getZones', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListZonesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\RunTaskResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'asset' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}', - 'environment' => 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}', - 'job' => 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}', - 'lake' => 'projects/{project}/locations/{location}/lakes/{lake}', - 'location' => 'projects/{project}/locations/{location}', - 'task' => 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}', - 'zone' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php deleted file mode 100644 index a62570d12938..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php +++ /dev/null @@ -1,701 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataplexService' => [ - 'CancelJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets', - 'body' => 'asset', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'asset_id', - ], - ], - 'CreateEnvironment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/environments', - 'body' => 'environment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'environment_id', - ], - ], - 'CreateLake' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lakes', - 'body' => 'lake', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'lake_id', - ], - ], - 'CreateTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/tasks', - 'body' => 'task', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'task_id', - ], - ], - 'CreateZone' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/zones', - 'body' => 'zone', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'zone_id', - ], - ], - 'DeleteAsset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLake' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteZone' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLake' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetZone' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAssetActions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/environments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakeActions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/actions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lakes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSessions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListZoneActions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListZones' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/zones', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}', - 'body' => 'asset', - 'placeholders' => [ - 'asset.name' => [ - 'getters' => [ - 'getAsset', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateEnvironment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}', - 'body' => 'environment', - 'placeholders' => [ - 'environment.name' => [ - 'getters' => [ - 'getEnvironment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateLake' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{lake.name=projects/*/locations/*/lakes/*}', - 'body' => 'lake', - 'placeholders' => [ - 'lake.name' => [ - 'getters' => [ - 'getLake', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateTask' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}', - 'body' => 'task', - 'placeholders' => [ - 'task.name' => [ - 'getters' => [ - 'getTask', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateZone' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}', - 'body' => 'zone', - 'placeholders' => [ - 'zone.name' => [ - 'getters' => [ - 'getZone', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json deleted file mode 100644 index d1de1dd5770a..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.MetadataService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ], - "retry_policy_4_codes": [ - "UNAVAILABLE" - ], - "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_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateEntity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreatePartition": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteEntity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeletePartition": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetEntity": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetPartition": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListEntities": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListPartitions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "UpdateEntity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php deleted file mode 100644 index 771d154bf19c..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php +++ /dev/null @@ -1,211 +0,0 @@ - [ - 'google.cloud.dataplex.v1.MetadataService' => [ - 'CreateEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePartition' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Partition', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePartition' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPartition' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Partition', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEntities' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntities', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListEntitiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPartitions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPartitions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListPartitionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', - 'headerParams' => [ - [ - 'keyName' => 'entity.name', - 'fieldAccessors' => [ - 'getEntity', - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'entity' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}', - 'partition' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}', - 'zone' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php deleted file mode 100644 index 1bb3e6834af8..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php +++ /dev/null @@ -1,400 +0,0 @@ - [ - 'google.cloud.dataplex.v1.MetadataService' => [ - 'CreateEntity' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities', - 'body' => 'entity', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePartition' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions', - 'body' => 'partition', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntity' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'etag', - ], - ], - 'DeletePartition' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEntity' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPartition' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEntities' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'view', - ], - ], - 'ListPartitions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEntity' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}', - 'body' => 'entity', - 'placeholders' => [ - 'entity.name' => [ - 'getters' => [ - 'getEntity', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php deleted file mode 100644 index 79ac7237e538..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php +++ /dev/null @@ -1,830 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ContentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContentServiceClient($options); - } - - /** @test */ - public function createContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - $response = $gapicClient->createContent($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.dataplex.v1.ContentService/CreateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - try { - $gapicClient->createContent($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 deleteContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new DeleteContentRequest()) - ->setName($formattedName); - $gapicClient->deleteContent($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/DeleteContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new DeleteContentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteContent($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 getContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new GetContentRequest()) - ->setName($formattedName); - $response = $gapicClient->getContent($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.dataplex.v1.ContentService/GetContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new GetContentRequest()) - ->setName($formattedName); - try { - $gapicClient->getContent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $contentElement = new Content(); - $content = [ - $contentElement, - ]; - $expectedResponse = new ListContentResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContent($content); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListContentRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listContent($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContent()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/ListContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListContentRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listContent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new UpdateContentRequest()) - ->setUpdateMask($updateMask) - ->setContent($content); - $response = $gapicClient->updateContent($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.dataplex.v1.ContentService/UpdateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new UpdateContentRequest()) - ->setUpdateMask($updateMask) - ->setContent($content); - try { - $gapicClient->updateContent($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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 createContentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - $response = $gapicClient->createContentAsync($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.dataplex.v1.ContentService/CreateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php deleted file mode 100644 index ca99effeb95a..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php +++ /dev/null @@ -1,1250 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataScanServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataScanServiceClient($options); - } - - /** @test */ - public function createDataScanTest() - { - $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/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - $response = $gapicClient->createDataScan($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.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getDataScanId(); - $this->assertProtobufEquals($dataScanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - $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 createDataScanExceptionTest() - { - $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/createDataScanTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - $response = $gapicClient->createDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - 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 deleteDataScanTest() - { - $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/deleteDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new DeleteDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataScan($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.dataplex.v1.DataScanService/DeleteDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - $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 deleteDataScanExceptionTest() - { - $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/deleteDataScanTest'); - $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 - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new DeleteDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - 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 getDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new GetDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataScan($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.dataplex.v1.DataScanService/GetDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new GetDataScanRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataScan($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 getDataScanJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $message = 'message954925063'; - $expectedResponse = new DataScanJob(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - $request = (new GetDataScanJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataScanJob($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.dataplex.v1.DataScanService/GetDataScanJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - $request = (new GetDataScanJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataScanJob($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 listDataScanJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScanJobsElement = new DataScanJob(); - $dataScanJobs = [ - $dataScanJobsElement, - ]; - $expectedResponse = new ListDataScanJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScanJobs($dataScanJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new ListDataScanJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataScanJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScanJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScanJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScanJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new ListDataScanJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataScanJobs($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 listDataScansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScansElement = new DataScan(); - $dataScans = [ - $dataScansElement, - ]; - $expectedResponse = new ListDataScansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScans($dataScans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataScansRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataScans($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScansExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataScansRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataScans($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 runDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunDataScanResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new RunDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->runDataScan($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.dataplex.v1.DataScanService/RunDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new RunDataScanRequest()) - ->setName($formattedName); - try { - $gapicClient->runDataScan($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 updateDataScanTest() - { - $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/updateDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $request = (new UpdateDataScanRequest()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDataScan($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.dataplex.v1.DataScanService/UpdateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - $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 updateDataScanExceptionTest() - { - $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/updateDataScanTest'); - $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 - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $request = (new UpdateDataScanRequest()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 createDataScanAsyncTest() - { - $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/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - $response = $gapicClient->createDataScanAsync($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.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getDataScanId(); - $this->assertProtobufEquals($dataScanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - $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()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php deleted file mode 100644 index f5ad2c3769c3..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php +++ /dev/null @@ -1,2183 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataTaxonomyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataTaxonomyServiceClient($options); - } - - /** @test */ - public function createDataAttributeTest() - { - $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/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $request = (new CreateDataAttributeRequest()) - ->setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->createDataAttribute($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.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeId(); - $this->assertProtobufEquals($dataAttributeId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - $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 createDataAttributeExceptionTest() - { - $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/createDataAttributeTest'); - $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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $request = (new CreateDataAttributeRequest()) - ->setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->createDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - 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 createDataAttributeBindingTest() - { - $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/createDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new CreateDataAttributeBindingRequest()) - ->setParent($formattedParent) - ->setDataAttributeBindingId($dataAttributeBindingId) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->createDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBindingId(); - $this->assertProtobufEquals($dataAttributeBindingId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - $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 createDataAttributeBindingExceptionTest() - { - $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/createDataAttributeBindingTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new CreateDataAttributeBindingRequest()) - ->setParent($formattedParent) - ->setDataAttributeBindingId($dataAttributeBindingId) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->createDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - 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 createDataTaxonomyTest() - { - $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/createDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $request = (new CreateDataTaxonomyRequest()) - ->setParent($formattedParent) - ->setDataTaxonomyId($dataTaxonomyId) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->createDataTaxonomy($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.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomyId(); - $this->assertProtobufEquals($dataTaxonomyId, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - $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 createDataTaxonomyExceptionTest() - { - $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/createDataTaxonomyTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $request = (new CreateDataTaxonomyRequest()) - ->setParent($formattedParent) - ->setDataTaxonomyId($dataTaxonomyId) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->createDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - 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 deleteDataAttributeTest() - { - $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/deleteDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new DeleteDataAttributeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataAttribute($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.dataplex.v1.DataTaxonomyService/DeleteDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - $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 deleteDataAttributeExceptionTest() - { - $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/deleteDataAttributeTest'); - $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 - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new DeleteDataAttributeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - 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 deleteDataAttributeBindingTest() - { - $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/deleteDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $request = (new DeleteDataAttributeBindingRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->deleteDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - $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 deleteDataAttributeBindingExceptionTest() - { - $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/deleteDataAttributeBindingTest'); - $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 - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $request = (new DeleteDataAttributeBindingRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->deleteDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - 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 deleteDataTaxonomyTest() - { - $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/deleteDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new DeleteDataTaxonomyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataTaxonomy($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.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - $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 deleteDataTaxonomyExceptionTest() - { - $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/deleteDataTaxonomyTest'); - $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 - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new DeleteDataTaxonomyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - 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 getDataAttributeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new GetDataAttributeRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataAttribute($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.dataplex.v1.DataTaxonomyService/GetDataAttribute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new GetDataAttributeRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataAttribute($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 getDataAttributeBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $request = (new GetDataAttributeBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $request = (new GetDataAttributeBindingRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataAttributeBinding($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 getDataTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new GetDataTaxonomyRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataTaxonomy($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.dataplex.v1.DataTaxonomyService/GetDataTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new GetDataTaxonomyRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataTaxonomy($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 listDataAttributeBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributeBindingsElement = new DataAttributeBinding(); - $dataAttributeBindings = [ - $dataAttributeBindingsElement, - ]; - $expectedResponse = new ListDataAttributeBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributeBindings($dataAttributeBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataAttributeBindingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataAttributeBindings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributeBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributeBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataAttributeBindingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataAttributeBindings($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 listDataAttributesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributesElement = new DataAttribute(); - $dataAttributes = [ - $dataAttributesElement, - ]; - $expectedResponse = new ListDataAttributesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributes($dataAttributes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new ListDataAttributesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataAttributes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new ListDataAttributesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataAttributes($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 listDataTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataTaxonomiesElement = new DataTaxonomy(); - $dataTaxonomies = [ - $dataTaxonomiesElement, - ]; - $expectedResponse = new ListDataTaxonomiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataTaxonomies($dataTaxonomies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataTaxonomiesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataTaxonomies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataTaxonomies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataTaxonomiesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataTaxonomies($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 updateDataAttributeTest() - { - $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/updateDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $request = (new UpdateDataAttributeRequest()) - ->setUpdateMask($updateMask) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->updateDataAttribute($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.dataplex.v1.DataTaxonomyService/UpdateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - $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 updateDataAttributeExceptionTest() - { - $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/updateDataAttributeTest'); - $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 - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $request = (new UpdateDataAttributeRequest()) - ->setUpdateMask($updateMask) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->updateDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - 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 updateDataAttributeBindingTest() - { - $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/updateDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new UpdateDataAttributeBindingRequest()) - ->setUpdateMask($updateMask) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->updateDataAttributeBinding($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.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - $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 updateDataAttributeBindingExceptionTest() - { - $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/updateDataAttributeBindingTest'); - $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 - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new UpdateDataAttributeBindingRequest()) - ->setUpdateMask($updateMask) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->updateDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - 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 updateDataTaxonomyTest() - { - $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/updateDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $request = (new UpdateDataTaxonomyRequest()) - ->setUpdateMask($updateMask) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->updateDataTaxonomy($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.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - $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 updateDataTaxonomyExceptionTest() - { - $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/updateDataTaxonomyTest'); - $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 - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $request = (new UpdateDataTaxonomyRequest()) - ->setUpdateMask($updateMask) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->updateDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 createDataAttributeAsyncTest() - { - $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/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $request = (new CreateDataAttributeRequest()) - ->setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->createDataAttributeAsync($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.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeId(); - $this->assertProtobufEquals($dataAttributeId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - $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()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php deleted file mode 100644 index 6e788afea844..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php +++ /dev/null @@ -1,3840 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataplexServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataplexServiceClient($options); - } - - /** @test */ - public function cancelJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new CancelJobRequest()) - ->setName($formattedName); - $gapicClient->cancelJob($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new CancelJobRequest()) - ->setName($formattedName); - try { - $gapicClient->cancelJob($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 createAssetTest() - { - $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/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAssetId($assetId) - ->setAsset($asset); - $response = $gapicClient->createAsset($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.dataplex.v1.DataplexService/CreateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAssetId(); - $this->assertProtobufEquals($assetId, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - $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 createAssetExceptionTest() - { - $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/createAssetTest'); - $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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAssetId($assetId) - ->setAsset($asset); - $response = $gapicClient->createAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - 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 createEnvironmentTest() - { - $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/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($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.dataplex.v1.DataplexService/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironmentId(); - $this->assertProtobufEquals($environmentId, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $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 createEnvironmentExceptionTest() - { - $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/createEnvironmentTest'); - $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - 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 createLakeTest() - { - $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/createLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $request = (new CreateLakeRequest()) - ->setParent($formattedParent) - ->setLakeId($lakeId) - ->setLake($lake); - $response = $gapicClient->createLake($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.dataplex.v1.DataplexService/CreateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLakeId(); - $this->assertProtobufEquals($lakeId, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - $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 createLakeExceptionTest() - { - $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/createLakeTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $request = (new CreateLakeRequest()) - ->setParent($formattedParent) - ->setLakeId($lakeId) - ->setLake($lake); - $response = $gapicClient->createLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - 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 createTaskTest() - { - $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/createTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTaskId($taskId) - ->setTask($task); - $response = $gapicClient->createTask($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.dataplex.v1.DataplexService/CreateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTaskId(); - $this->assertProtobufEquals($taskId, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - $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 createTaskExceptionTest() - { - $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/createTaskTest'); - $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTaskId($taskId) - ->setTask($task); - $response = $gapicClient->createTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - 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 createZoneTest() - { - $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/createZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new CreateZoneRequest()) - ->setParent($formattedParent) - ->setZoneId($zoneId) - ->setZone($zone); - $response = $gapicClient->createZone($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.dataplex.v1.DataplexService/CreateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getZoneId(); - $this->assertProtobufEquals($zoneId, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - $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 createZoneExceptionTest() - { - $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/createZoneTest'); - $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new CreateZoneRequest()) - ->setParent($formattedParent) - ->setZoneId($zoneId) - ->setZone($zone); - $response = $gapicClient->createZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - 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 deleteAssetTest() - { - $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/deleteAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAsset($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.dataplex.v1.DataplexService/DeleteAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - $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 deleteAssetExceptionTest() - { - $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/deleteAssetTest'); - $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 - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - 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 deleteEnvironmentTest() - { - $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/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new DeleteEnvironmentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEnvironment($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.dataplex.v1.DataplexService/DeleteEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - $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 deleteEnvironmentExceptionTest() - { - $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/deleteEnvironmentTest'); - $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 - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new DeleteEnvironmentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - 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 deleteLakeTest() - { - $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/deleteLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new DeleteLakeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLake($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.dataplex.v1.DataplexService/DeleteLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - $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 deleteLakeExceptionTest() - { - $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/deleteLakeTest'); - $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 - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new DeleteLakeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - 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 deleteTaskTest() - { - $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/deleteTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new DeleteTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTask($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.dataplex.v1.DataplexService/DeleteTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - $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 deleteTaskExceptionTest() - { - $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/deleteTaskTest'); - $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 - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new DeleteTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - 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 deleteZoneTest() - { - $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/deleteZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new DeleteZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteZone($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.dataplex.v1.DataplexService/DeleteZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - $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 deleteZoneExceptionTest() - { - $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/deleteZoneTest'); - $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 - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new DeleteZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - 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 getAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->getAsset($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.dataplex.v1.DataplexService/GetAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - try { - $gapicClient->getAsset($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 getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new GetEnvironmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getEnvironment($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.dataplex.v1.DataplexService/GetEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new GetEnvironmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getEnvironment($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 getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $retryCount = 928040776; - $serviceJob = 'serviceJob-1928057037'; - $message = 'message954925063'; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setRetryCount($retryCount); - $expectedResponse->setServiceJob($serviceJob); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getJob($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.dataplex.v1.DataplexService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getJob($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 getLakeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new GetLakeRequest()) - ->setName($formattedName); - $response = $gapicClient->getLake($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.dataplex.v1.DataplexService/GetLake', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLakeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new GetLakeRequest()) - ->setName($formattedName); - try { - $gapicClient->getLake($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 getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->getTask($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.dataplex.v1.DataplexService/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->getTask($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 getZoneTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new GetZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->getZone($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.dataplex.v1.DataplexService/GetZone', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getZoneExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new GetZoneRequest()) - ->setName($formattedName); - try { - $gapicClient->getZone($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 listAssetActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new ListAssetActionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAssetActions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssetActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new ListAssetActionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAssetActions($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 listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assetsElement = new Asset(); - $assets = [ - $assetsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssets($assets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAssets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAssets($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 listEnvironmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new ListEnvironmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListEnvironmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEnvironments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListEnvironments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListEnvironmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEnvironments($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 listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listJobs($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 listLakeActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListLakeActionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLakeActions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakeActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakeActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListLakeActionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLakeActions($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 listLakesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $lakesElement = new Lake(); - $lakes = [ - $lakesElement, - ]; - $expectedResponse = new ListLakesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLakes($lakes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLakesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLakes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLakes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLakesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLakes($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 listSessionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sessionsElement = new Session(); - $sessions = [ - $sessionsElement, - ]; - $expectedResponse = new ListSessionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSessions($sessions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new ListSessionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSessions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSessions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListSessions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new ListSessionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSessions($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 listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTasks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTasks($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 listZoneActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListZoneActionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listZoneActions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZoneActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZoneActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListZoneActionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listZoneActions($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 listZonesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $zonesElement = new Zone(); - $zones = [ - $zonesElement, - ]; - $expectedResponse = new ListZonesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setZones($zones); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListZonesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listZones($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getZones()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZones', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZonesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListZonesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listZones($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 runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunTaskResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new RunTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->runTask($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.dataplex.v1.DataplexService/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new RunTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->runTask($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 updateAssetTest() - { - $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/updateAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - $response = $gapicClient->updateAsset($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.dataplex.v1.DataplexService/UpdateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - $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 updateAssetExceptionTest() - { - $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/updateAssetTest'); - $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 - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - $response = $gapicClient->updateAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - 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 updateEnvironmentTest() - { - $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/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new UpdateEnvironmentRequest()) - ->setUpdateMask($updateMask) - ->setEnvironment($environment); - $response = $gapicClient->updateEnvironment($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.dataplex.v1.DataplexService/UpdateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - $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 updateEnvironmentExceptionTest() - { - $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/updateEnvironmentTest'); - $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 - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new UpdateEnvironmentRequest()) - ->setUpdateMask($updateMask) - ->setEnvironment($environment); - $response = $gapicClient->updateEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - 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 updateLakeTest() - { - $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/updateLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $lake = new Lake(); - $request = (new UpdateLakeRequest()) - ->setUpdateMask($updateMask) - ->setLake($lake); - $response = $gapicClient->updateLake($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.dataplex.v1.DataplexService/UpdateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - $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 updateLakeExceptionTest() - { - $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/updateLakeTest'); - $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 - $updateMask = new FieldMask(); - $lake = new Lake(); - $request = (new UpdateLakeRequest()) - ->setUpdateMask($updateMask) - ->setLake($lake); - $response = $gapicClient->updateLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - 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 updateTaskTest() - { - $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/updateTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new UpdateTaskRequest()) - ->setUpdateMask($updateMask) - ->setTask($task); - $response = $gapicClient->updateTask($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.dataplex.v1.DataplexService/UpdateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - $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 updateTaskExceptionTest() - { - $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/updateTaskTest'); - $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 - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new UpdateTaskRequest()) - ->setUpdateMask($updateMask) - ->setTask($task); - $response = $gapicClient->updateTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - 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 updateZoneTest() - { - $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/updateZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new UpdateZoneRequest()) - ->setUpdateMask($updateMask) - ->setZone($zone); - $response = $gapicClient->updateZone($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.dataplex.v1.DataplexService/UpdateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - $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 updateZoneExceptionTest() - { - $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/updateZoneTest'); - $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 - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new UpdateZoneRequest()) - ->setUpdateMask($updateMask) - ->setZone($zone); - $response = $gapicClient->updateZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 cancelJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new CancelJobRequest()) - ->setName($formattedName); - $gapicClient->cancelJobAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php deleted file mode 100644 index cc460c9d5df6..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php +++ /dev/null @@ -1,1239 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetadataServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetadataServiceClient($options); - } - - /** @test */ - public function createEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - $response = $gapicClient->createEntity($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.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - try { - $gapicClient->createEntity($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 createPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - $request = (new CreatePartitionRequest()) - ->setParent($formattedParent) - ->setPartition($partition); - $response = $gapicClient->createPartition($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.dataplex.v1.MetadataService/CreatePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPartition(); - $this->assertProtobufEquals($partition, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - $request = (new CreatePartitionRequest()) - ->setParent($formattedParent) - ->setPartition($partition); - try { - $gapicClient->createPartition($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 deleteEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - $request = (new DeleteEntityRequest()) - ->setName($formattedName) - ->setEtag($etag); - $gapicClient->deleteEntity($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeleteEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - $request = (new DeleteEntityRequest()) - ->setName($formattedName) - ->setEtag($etag); - try { - $gapicClient->deleteEntity($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 deletePartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new DeletePartitionRequest()) - ->setName($formattedName); - $gapicClient->deletePartition($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeletePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new DeletePartitionRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePartition($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 getEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new GetEntityRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntity($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.dataplex.v1.MetadataService/GetEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new GetEntityRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntity($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 getPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new GetPartitionRequest()) - ->setName($formattedName); - $response = $gapicClient->getPartition($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.dataplex.v1.MetadataService/GetPartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new GetPartitionRequest()) - ->setName($formattedName); - try { - $gapicClient->getPartition($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 listEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entitiesElement = new Entity(); - $entities = [ - $entitiesElement, - ]; - $expectedResponse = new ListEntitiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntities($entities); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - $request = (new ListEntitiesRequest()) - ->setParent($formattedParent) - ->setView($view); - $response = $gapicClient->listEntities($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntities()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - $request = (new ListEntitiesRequest()) - ->setParent($formattedParent) - ->setView($view); - try { - $gapicClient->listEntities($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 listPartitionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Partition(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new ListPartitionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new ListPartitionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPartitions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListPartitions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPartitionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new ListPartitionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPartitions($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 updateEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new UpdateEntityRequest()) - ->setEntity($entity); - $response = $gapicClient->updateEntity($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.dataplex.v1.MetadataService/UpdateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new UpdateEntityRequest()) - ->setEntity($entity); - try { - $gapicClient->updateEntity($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($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.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 createEntityAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - $response = $gapicClient->createEntityAsync($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.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php deleted file mode 100644 index beaa6b9c313c..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php +++ /dev/null @@ -1,731 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ContentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContentServiceClient($options); - } - - /** @test */ - public function createContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $response = $gapicClient->createContent($formattedParent, $content); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/CreateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - try { - $gapicClient->createContent($formattedParent, $content); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $gapicClient->deleteContent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/DeleteContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - try { - $gapicClient->deleteContent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $response = $gapicClient->getContent($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - try { - $gapicClient->getContent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $contentElement = new Content(); - $content = [ - $contentElement, - ]; - $expectedResponse = new ListContentResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContent($content); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listContent($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContent()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/ListContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listContent($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $response = $gapicClient->updateContent($updateMask, $content); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/UpdateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - try { - $gapicClient->updateContent($updateMask, $content); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php deleted file mode 100644 index a9d0fb1b8bea..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php +++ /dev/null @@ -1,1097 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataScanServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataScanServiceClient($options); - } - - /** @test */ - public function createDataScanTest() - { - $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/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $response = $gapicClient->createDataScan($formattedParent, $dataScan, $dataScanId); - $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.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getDataScanId(); - $this->assertProtobufEquals($dataScanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - $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 createDataScanExceptionTest() - { - $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/createDataScanTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $response = $gapicClient->createDataScan($formattedParent, $dataScan, $dataScanId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - 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 deleteDataScanTest() - { - $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/deleteDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->deleteDataScan($formattedName); - $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.dataplex.v1.DataScanService/DeleteDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - $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 deleteDataScanExceptionTest() - { - $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/deleteDataScanTest'); - $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 - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->deleteDataScan($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - 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 getDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->getDataScan($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - try { - $gapicClient->getDataScan($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $message = 'message954925063'; - $expectedResponse = new DataScanJob(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - $response = $gapicClient->getDataScanJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScanJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - try { - $gapicClient->getDataScanJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScanJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScanJobsElement = new DataScanJob(); - $dataScanJobs = [ - $dataScanJobsElement, - ]; - $expectedResponse = new ListDataScanJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScanJobs($dataScanJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->listDataScanJobs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScanJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScanJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScanJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - try { - $gapicClient->listDataScanJobs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScansElement = new DataScan(); - $dataScans = [ - $dataScansElement, - ]; - $expectedResponse = new ListDataScansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScans($dataScans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDataScans($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScansExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listDataScans($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunDataScanResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->runDataScan($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/RunDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - try { - $gapicClient->runDataScan($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataScanTest() - { - $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/updateDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataScan($dataScan, $updateMask); - $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.dataplex.v1.DataScanService/UpdateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - $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 updateDataScanExceptionTest() - { - $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/updateDataScanTest'); - $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 - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataScan($dataScan, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php deleted file mode 100644 index 8031c614b69c..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php +++ /dev/null @@ -1,1977 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataTaxonomyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataTaxonomyServiceClient($options); - } - - /** @test */ - public function createDataAttributeTest() - { - $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/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $response = $gapicClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - $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.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeId(); - $this->assertProtobufEquals($dataAttributeId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - $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 createDataAttributeExceptionTest() - { - $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/createDataAttributeTest'); - $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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $response = $gapicClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - 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 createDataAttributeBindingTest() - { - $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/createDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - $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.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBindingId(); - $this->assertProtobufEquals($dataAttributeBindingId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - $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 createDataAttributeBindingExceptionTest() - { - $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/createDataAttributeBindingTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - 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 createDataTaxonomyTest() - { - $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/createDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - $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.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomyId(); - $this->assertProtobufEquals($dataTaxonomyId, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - $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 createDataTaxonomyExceptionTest() - { - $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/createDataTaxonomyTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - 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 deleteDataAttributeTest() - { - $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/deleteDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $response = $gapicClient->deleteDataAttribute($formattedName); - $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.dataplex.v1.DataTaxonomyService/DeleteDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - $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 deleteDataAttributeExceptionTest() - { - $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/deleteDataAttributeTest'); - $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 - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $response = $gapicClient->deleteDataAttribute($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - 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 deleteDataAttributeBindingTest() - { - $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/deleteDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $response = $gapicClient->deleteDataAttributeBinding($formattedName, $etag); - $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.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - $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 deleteDataAttributeBindingExceptionTest() - { - $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/deleteDataAttributeBindingTest'); - $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 - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $response = $gapicClient->deleteDataAttributeBinding($formattedName, $etag); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - 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 deleteDataTaxonomyTest() - { - $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/deleteDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->deleteDataTaxonomy($formattedName); - $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.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - $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 deleteDataTaxonomyExceptionTest() - { - $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/deleteDataTaxonomyTest'); - $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 - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->deleteDataTaxonomy($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - 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 getDataAttributeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $response = $gapicClient->getDataAttribute($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttribute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - try { - $gapicClient->getDataAttribute($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $response = $gapicClient->getDataAttributeBinding($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - try { - $gapicClient->getDataAttributeBinding($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->getDataTaxonomy($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - try { - $gapicClient->getDataTaxonomy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributeBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributeBindingsElement = new DataAttributeBinding(); - $dataAttributeBindings = [ - $dataAttributeBindingsElement, - ]; - $expectedResponse = new ListDataAttributeBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributeBindings($dataAttributeBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDataAttributeBindings($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributeBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributeBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listDataAttributeBindings($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributesElement = new DataAttribute(); - $dataAttributes = [ - $dataAttributesElement, - ]; - $expectedResponse = new ListDataAttributesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributes($dataAttributes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->listDataAttributes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - try { - $gapicClient->listDataAttributes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataTaxonomiesElement = new DataTaxonomy(); - $dataTaxonomies = [ - $dataTaxonomiesElement, - ]; - $expectedResponse = new ListDataTaxonomiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataTaxonomies($dataTaxonomies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDataTaxonomies($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataTaxonomies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listDataTaxonomies($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeTest() - { - $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/updateDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $response = $gapicClient->updateDataAttribute($updateMask, $dataAttribute); - $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.dataplex.v1.DataTaxonomyService/UpdateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - $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 updateDataAttributeExceptionTest() - { - $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/updateDataAttributeTest'); - $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 - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $response = $gapicClient->updateDataAttribute($updateMask, $dataAttribute); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - 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 updateDataAttributeBindingTest() - { - $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/updateDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - $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.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - $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 updateDataAttributeBindingExceptionTest() - { - $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/updateDataAttributeBindingTest'); - $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 - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - 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 updateDataTaxonomyTest() - { - $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/updateDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - $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.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - $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 updateDataTaxonomyExceptionTest() - { - $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/updateDataTaxonomyTest'); - $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 - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php deleted file mode 100644 index 94498deca084..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php +++ /dev/null @@ -1,3594 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataplexServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataplexServiceClient($options); - } - - /** @test */ - public function cancelJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $gapicClient->cancelJob($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - try { - $gapicClient->cancelJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssetTest() - { - $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/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->createAsset($formattedParent, $assetId, $asset); - $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.dataplex.v1.DataplexService/CreateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAssetId(); - $this->assertProtobufEquals($assetId, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - $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 createAssetExceptionTest() - { - $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/createAssetTest'); - $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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->createAsset($formattedParent, $assetId, $asset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - 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 createEnvironmentTest() - { - $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/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->createEnvironment($formattedParent, $environmentId, $environment); - $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.dataplex.v1.DataplexService/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironmentId(); - $this->assertProtobufEquals($environmentId, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $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 createEnvironmentExceptionTest() - { - $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/createEnvironmentTest'); - $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->createEnvironment($formattedParent, $environmentId, $environment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - 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 createLakeTest() - { - $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/createLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $response = $gapicClient->createLake($formattedParent, $lakeId, $lake); - $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.dataplex.v1.DataplexService/CreateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLakeId(); - $this->assertProtobufEquals($lakeId, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - $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 createLakeExceptionTest() - { - $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/createLakeTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $response = $gapicClient->createLake($formattedParent, $lakeId, $lake); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - 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 createTaskTest() - { - $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/createTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->createTask($formattedParent, $taskId, $task); - $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.dataplex.v1.DataplexService/CreateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTaskId(); - $this->assertProtobufEquals($taskId, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - $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 createTaskExceptionTest() - { - $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/createTaskTest'); - $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->createTask($formattedParent, $taskId, $task); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - 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 createZoneTest() - { - $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/createZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->createZone($formattedParent, $zoneId, $zone); - $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.dataplex.v1.DataplexService/CreateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getZoneId(); - $this->assertProtobufEquals($zoneId, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - $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 createZoneExceptionTest() - { - $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/createZoneTest'); - $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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->createZone($formattedParent, $zoneId, $zone); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - 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 deleteAssetTest() - { - $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/deleteAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->deleteAsset($formattedName); - $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.dataplex.v1.DataplexService/DeleteAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - $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 deleteAssetExceptionTest() - { - $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/deleteAssetTest'); - $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 - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->deleteAsset($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - 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 deleteEnvironmentTest() - { - $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/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->deleteEnvironment($formattedName); - $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.dataplex.v1.DataplexService/DeleteEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - $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 deleteEnvironmentExceptionTest() - { - $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/deleteEnvironmentTest'); - $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 - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->deleteEnvironment($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - 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 deleteLakeTest() - { - $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/deleteLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->deleteLake($formattedName); - $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.dataplex.v1.DataplexService/DeleteLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - $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 deleteLakeExceptionTest() - { - $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/deleteLakeTest'); - $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 - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->deleteLake($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - 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 deleteTaskTest() - { - $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/deleteTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->deleteTask($formattedName); - $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.dataplex.v1.DataplexService/DeleteTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - $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 deleteTaskExceptionTest() - { - $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/deleteTaskTest'); - $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 - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->deleteTask($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - 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 deleteZoneTest() - { - $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/deleteZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->deleteZone($formattedName); - $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.dataplex.v1.DataplexService/DeleteZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - $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 deleteZoneExceptionTest() - { - $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/deleteZoneTest'); - $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 - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->deleteZone($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - 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 getAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->getAsset($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - try { - $gapicClient->getAsset($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->getEnvironment($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - try { - $gapicClient->getEnvironment($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $retryCount = 928040776; - $serviceJob = 'serviceJob-1928057037'; - $message = 'message954925063'; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setRetryCount($retryCount); - $expectedResponse->setServiceJob($serviceJob); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $response = $gapicClient->getJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - try { - $gapicClient->getJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLakeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->getLake($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetLake', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLakeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->getLake($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->getTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - try { - $gapicClient->getTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getZoneTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->getZone($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetZone', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getZoneExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - try { - $gapicClient->getZone($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->listAssetActions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssetActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - try { - $gapicClient->listAssetActions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assetsElement = new Asset(); - $assets = [ - $assetsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssets($assets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->listAssets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - try { - $gapicClient->listAssets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new ListEnvironmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listEnvironments($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListEnvironments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listEnvironments($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->listJobs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - try { - $gapicClient->listJobs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakeActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listLakeActions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakeActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakeActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listLakeActions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $lakesElement = new Lake(); - $lakes = [ - $lakesElement, - ]; - $expectedResponse = new ListLakesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLakes($lakes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listLakes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLakes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listLakes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sessionsElement = new Session(); - $sessions = [ - $sessionsElement, - ]; - $expectedResponse = new ListSessionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSessions($sessions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->listSessions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSessions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListSessions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - try { - $gapicClient->listSessions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listTasks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listTasks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZoneActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->listZoneActions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZoneActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZoneActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - try { - $gapicClient->listZoneActions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZonesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $zonesElement = new Zone(); - $zones = [ - $zonesElement, - ]; - $expectedResponse = new ListZonesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setZones($zones); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listZones($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getZones()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZones', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZonesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listZones($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunTaskResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->runTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - try { - $gapicClient->runTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAssetTest() - { - $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/updateAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->updateAsset($updateMask, $asset); - $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.dataplex.v1.DataplexService/UpdateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - $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 updateAssetExceptionTest() - { - $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/updateAssetTest'); - $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 - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->updateAsset($updateMask, $asset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - 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 updateEnvironmentTest() - { - $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/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->updateEnvironment($updateMask, $environment); - $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.dataplex.v1.DataplexService/UpdateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - $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 updateEnvironmentExceptionTest() - { - $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/updateEnvironmentTest'); - $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 - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->updateEnvironment($updateMask, $environment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - 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 updateLakeTest() - { - $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/updateLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $lake = new Lake(); - $response = $gapicClient->updateLake($updateMask, $lake); - $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.dataplex.v1.DataplexService/UpdateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - $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 updateLakeExceptionTest() - { - $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/updateLakeTest'); - $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 - $updateMask = new FieldMask(); - $lake = new Lake(); - $response = $gapicClient->updateLake($updateMask, $lake); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - 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 updateTaskTest() - { - $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/updateTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->updateTask($updateMask, $task); - $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.dataplex.v1.DataplexService/UpdateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - $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 updateTaskExceptionTest() - { - $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/updateTaskTest'); - $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 - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->updateTask($updateMask, $task); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - 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 updateZoneTest() - { - $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/updateZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->updateZone($updateMask, $zone); - $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.dataplex.v1.DataplexService/UpdateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - $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 updateZoneExceptionTest() - { - $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/updateZoneTest'); - $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 - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->updateZone($updateMask, $zone); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php deleted file mode 100644 index 75543bbbd4a9..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php +++ /dev/null @@ -1,1092 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetadataServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetadataServiceClient($options); - } - - /** @test */ - public function createEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $response = $gapicClient->createEntity($formattedParent, $entity); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - try { - $gapicClient->createEntity($formattedParent, $entity); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - $response = $gapicClient->createPartition($formattedParent, $partition); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreatePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPartition(); - $this->assertProtobufEquals($partition, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - try { - $gapicClient->createPartition($formattedParent, $partition); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - $gapicClient->deleteEntity($formattedName, $etag); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeleteEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - try { - $gapicClient->deleteEntity($formattedName, $etag); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $gapicClient->deletePartition($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeletePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - try { - $gapicClient->deletePartition($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $response = $gapicClient->getEntity($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - try { - $gapicClient->getEntity($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $response = $gapicClient->getPartition($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetPartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - try { - $gapicClient->getPartition($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entitiesElement = new Entity(); - $entities = [ - $entitiesElement, - ]; - $expectedResponse = new ListEntitiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntities($entities); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - $response = $gapicClient->listEntities($formattedParent, $view); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntities()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - try { - $gapicClient->listEntities($formattedParent, $view); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPartitionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Partition(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new ListPartitionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $response = $gapicClient->listPartitions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListPartitions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPartitionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - try { - $gapicClient->listPartitions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $response = $gapicClient->updateEntity($entity); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/UpdateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - try { - $gapicClient->updateEntity($entity); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}